亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? c-mips64.c

?? 該文件是rt_linux
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Carsten Langgaard, carstenl@mips.com * Copyright (C) 2002 MIPS Technologies, Inc.  All rights reserved. * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * * MIPS64 CPU variant specific Cache routines. * These routine are not optimized in any way, they are done in a generic way * so they can be used on all MIPS64 compliant CPUs, and also done in an * attempt not to break anything for the R4xx0 style CPUs. */#include <linux/init.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/mm.h>#include <asm/bootinfo.h>#include <asm/cpu.h>#include <asm/bcache.h>#include <asm/io.h>#include <asm/page.h>#include <asm/pgtable.h>#include <asm/system.h>#include <asm/mmu_context.h>/* CP0 hazard avoidance. */#define BARRIER __asm__ __volatile__(".set noreorder\n\t" \				     "nop; nop; nop; nop; nop; nop;\n\t" \				     ".set reorder\n\t")/* Primary cache parameters. */int icache_size, dcache_size; /* Size in bytes */int ic_lsize, dc_lsize;       /* LineSize in bytes *//* Secondary cache (if present) parameters. */unsigned int scache_size, sc_lsize;	/* Again, in bytes */#include <asm/cacheops.h>#include <asm/mips64_cache.h>#undef DEBUG_CACHE/* * Dummy cache handling routines for machines without boardcaches */static void no_sc_noop(void) {}static struct bcache_ops no_sc_ops = {	(void *)no_sc_noop, (void *)no_sc_noop,	(void *)no_sc_noop, (void *)no_sc_noop};struct bcache_ops *bcops = &no_sc_ops;static inline void mips64_flush_cache_all_sc(void){	unsigned long flags;	__save_and_cli(flags);	blast_dcache(); blast_icache(); blast_scache();	__restore_flags(flags);}static inline void mips64_flush_cache_all_pc(void){	unsigned long flags;	__save_and_cli(flags);	blast_dcache(); blast_icache();	__restore_flags(flags);}static voidmips64_flush_cache_range_sc(struct mm_struct *mm,			 unsigned long start,			 unsigned long end){	struct vm_area_struct *vma;	unsigned long flags;	if(mm->context == 0)		return;	start &= PAGE_MASK;#ifdef DEBUG_CACHE	printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);#endif	vma = find_vma(mm, start);	if(vma) {		if(mm->context != current->mm->context) {			mips64_flush_cache_all_sc();		} else {			pgd_t *pgd;			pmd_t *pmd;			pte_t *pte;			__save_and_cli(flags);			while(start < end) {				pgd = pgd_offset(mm, start);				pmd = pmd_offset(pgd, start);				pte = pte_offset(pmd, start);				if(pte_val(*pte) & _PAGE_VALID)					blast_scache_page(start);				start += PAGE_SIZE;			}			__restore_flags(flags);		}	}}static void mips64_flush_cache_range_pc(struct mm_struct *mm,				     unsigned long start,				     unsigned long end){	if(mm->context != 0) {		unsigned long flags;#ifdef DEBUG_CACHE		printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);#endif		__save_and_cli(flags);		blast_dcache(); blast_icache();		__restore_flags(flags);	}}/* * On architectures like the Sparc, we could get rid of lines in * the cache created only by a certain context, but on the MIPS * (and actually certain Sparc's) we cannot. */static void mips64_flush_cache_mm_sc(struct mm_struct *mm){	if(mm->context != 0) {#ifdef DEBUG_CACHE		printk("cmm[%d]", (int)mm->context);#endif		mips64_flush_cache_all_sc();	}}static void mips64_flush_cache_mm_pc(struct mm_struct *mm){	if(mm->context != 0) {#ifdef DEBUG_CACHE		printk("cmm[%d]", (int)mm->context);#endif		mips64_flush_cache_all_pc();	}}static void mips64_flush_cache_page_sc(struct vm_area_struct *vma,				    unsigned long page){	struct mm_struct *mm = vma->vm_mm;	unsigned long flags;	pgd_t *pgdp;	pmd_t *pmdp;	pte_t *ptep;	/*	 * If ownes no valid ASID yet, cannot possibly have gotten	 * this page into the cache.	 */	if (mm->context == 0)		return;#ifdef DEBUG_CACHE	printk("cpage[%d,%08lx]", (int)mm->context, page);#endif	__save_and_cli(flags);	page &= PAGE_MASK;	pgdp = pgd_offset(mm, page);	pmdp = pmd_offset(pgdp, page);	ptep = pte_offset(pmdp, page);	/*	 * If the page isn't marked valid, the page cannot possibly be	 * in the cache.	 */	if (!(pte_val(*ptep) & _PAGE_VALID))		goto out;	/*	 * Doing flushes for another ASID than the current one is	 * too difficult since R4k caches do a TLB translation	 * for every cache flush operation.  So we do indexed flushes	 * in that case, which doesn't overly flush the cache too much.	 */	if (mm->context != current->active_mm->context) {		/*		 * Do indexed flush, too much work to get the (possible)		 * tlb refills to work correctly.		 */		page = (KSEG0 + (page & (scache_size - 1)));		blast_dcache_page_indexed(page);		blast_scache_page_indexed(page);	} else		blast_scache_page(page);out:	__restore_flags(flags);}static void mips64_flush_cache_page_pc(struct vm_area_struct *vma,				    unsigned long page){	struct mm_struct *mm = vma->vm_mm;	unsigned long flags;	pgd_t *pgdp;	pmd_t *pmdp;	pte_t *ptep;	/*	 * If ownes no valid ASID yet, cannot possibly have gotten	 * this page into the cache.	 */	if (mm->context == 0)		return;#ifdef DEBUG_CACHE	printk("cpage[%d,%08lx]", (int)mm->context, page);#endif	__save_and_cli(flags);	page &= PAGE_MASK;	pgdp = pgd_offset(mm, page);	pmdp = pmd_offset(pgdp, page);	ptep = pte_offset(pmdp, page);	/*	 * If the page isn't marked valid, the page cannot possibly be	 * in the cache.	 */	if (!(pte_val(*ptep) & _PAGE_VALID))		goto out;	/*	 * Doing flushes for another ASID than the current one is	 * too difficult since Mips64 caches do a TLB translation	 * for every cache flush operation.  So we do indexed flushes	 * in that case, which doesn't overly flush the cache too much.	 */	if (mm == current->active_mm) {		blast_dcache_page(page);	} else {		/* Do indexed flush, too much work to get the (possible)		 * tlb refills to work correctly.		 */		page = (KSEG0 + (page & ((unsigned long)dcache_size - 1)));		blast_dcache_page_indexed(page);	}out:	__restore_flags(flags);}/* If the addresses passed to these routines are valid, they are * either: * * 1) In KSEG0, so we can do a direct flush of the page. * 2) In KSEG2, and since every process can translate those *    addresses all the time in kernel mode we can do a direct *    flush. * 3) In KSEG1, no flush necessary. */static void mips64_flush_page_to_ram_sc(struct page *page){	blast_scache_page((unsigned long)page_address(page));}static void mips64_flush_page_to_ram_pc(struct page *page){	blast_dcache_page((unsigned long)page_address(page));}static voidmips64_flush_icache_page_s(struct vm_area_struct *vma, struct page *page){	/*	 * We did an scache flush therefore PI is already clean.	 */}static voidmips64_flush_icache_range(unsigned long start, unsigned long end){	flush_cache_all();}static voidmips64_flush_icache_page(struct vm_area_struct *vma, struct page *page){	unsigned long address;	if (!(vma->vm_flags & VM_EXEC))		return;	address = KSEG0 + ((unsigned long)page_address(page) & PAGE_MASK & ((unsigned long)icache_size - 1));	blast_icache_page_indexed(address);}/* * Writeback and invalidate the primary cache dcache before DMA. */static voidmips64_dma_cache_wback_inv_pc(unsigned long addr, unsigned long size){	unsigned long end, a;	unsigned int flags;	if (size >= (unsigned long)dcache_size) {		blast_dcache();	} else {	        __save_and_cli(flags);		a = addr & ~(dc_lsize - 1);		end = (addr + size) & ~((unsigned long)dc_lsize - 1);		while (1) {			flush_dcache_line(a); /* Hit_Writeback_Inv_D */			if (a == end) break;			a += dc_lsize;		}		__restore_flags(flags);	}	bc_wback_inv(addr, size);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清在线一区| 日韩一区二区三区电影| 欧美日韩在线播放三区| 精品视频在线视频| 日韩美女一区二区三区| 国产精品日产欧美久久久久| 一区二区在线观看av| 日本麻豆一区二区三区视频| 国产成a人亚洲精| 欧美日韩国产一二三| 欧美成人综合网站| 亚洲最新视频在线观看| 久久99久久久欧美国产| 久久午夜色播影院免费高清| 99久久99久久久精品齐齐| 欧美久久久影院| 日韩理论片在线| 国产福利一区二区三区视频| 在线综合视频播放| 亚洲色图欧美在线| 久久国产乱子精品免费女| 欧美丝袜自拍制服另类| 国产精品国产精品国产专区不片| 欧美大片拔萝卜| 视频一区在线视频| 欧美亚洲国产怡红院影院| 国产精品久久久久影院色老大| 蜜臀av在线播放一区二区三区| 日韩精品资源二区在线| 自拍av一区二区三区| av午夜一区麻豆| 中文字幕精品三区| 成人福利在线看| 国产精品国产三级国产有无不卡 | 99re成人在线| 亚洲人精品一区| 欧美影视一区二区三区| 亚洲综合清纯丝袜自拍| 欧美亚洲愉拍一区二区| 亚洲黄色av一区| 欧美日韩免费在线视频| 日韩成人免费看| 日韩午夜在线影院| 激情小说欧美图片| 欧美国产国产综合| 91麻豆国产福利在线观看| 亚洲欧美日韩综合aⅴ视频| 欧洲视频一区二区| 亚洲成人动漫精品| 欧美精品一区二区在线播放 | 成人激情动漫在线观看| 中文字幕亚洲一区二区va在线| 色视频一区二区| 麻豆一区二区99久久久久| 国产日韩欧美一区二区三区乱码| 国产一区二区三区在线观看免费视频| 2022国产精品视频| 99视频一区二区| 男人操女人的视频在线观看欧美| 欧美激情中文不卡| 欧美视频一区在线| 国产成人精品午夜视频免费| 亚洲人成7777| 最新国产の精品合集bt伙计| 波多野结衣中文字幕一区| 亚洲高清久久久| 国产欧美日韩在线看| 欧美人与z0zoxxxx视频| 丁香激情综合五月| 天堂va蜜桃一区二区三区漫画版| 日本一区二区三区电影| 欧美日韩视频一区二区| 成人在线视频一区| 久久精品72免费观看| 亚洲成a人v欧美综合天堂 | 欧美成人r级一区二区三区| 色综合网站在线| 国产91丝袜在线观看| 久久99精品国产| 久久国产尿小便嘘嘘| 日韩电影网1区2区| 亚洲成av人片在www色猫咪| 亚洲视频免费看| 国产精品久久久一区麻豆最新章节| 91精品国产综合久久小美女| 色天天综合色天天久久| 不卡视频免费播放| 成人午夜私人影院| 99久久伊人网影院| av高清不卡在线| 色综合久久综合| 欧美性色综合网| 欧美亚洲国产一区二区三区va | 欧美精品一区二区三区蜜臀 | 久久久久久一级片| 欧美极品aⅴ影院| 国产精品久久免费看| 成人欧美一区二区三区| 亚洲一区二区在线视频| 午夜伦理一区二区| 久久精品国产秦先生| 久久精品99国产精品| 风间由美一区二区三区在线观看| av一本久道久久综合久久鬼色| 成人午夜私人影院| 在线观看91精品国产入口| 91精品在线观看入口| 久久夜色精品国产噜噜av| 中文av一区二区| 亚洲一区二区av电影| 欧美日韩和欧美的一区二区| 欧美大尺度电影在线| 国产精品免费人成网站| 偷拍一区二区三区四区| 国产精品亚洲专一区二区三区| 一本色道久久综合狠狠躁的推荐 | 国产欧美日韩在线视频| 亚洲成a人片综合在线| 国产在线不卡视频| 91福利精品视频| 久久久久久免费网| 五月天婷婷综合| 粉嫩高潮美女一区二区三区| 精品视频123区在线观看| 国产亚洲精品bt天堂精选| 亚洲国产三级在线| 成人精品国产福利| 日韩欧美黄色影院| 亚洲18影院在线观看| 色域天天综合网| 国产偷国产偷亚洲高清人白洁| 图片区小说区区亚洲影院| 一本到不卡精品视频在线观看| 亚洲精品一区二区三区四区高清 | 国产成人精品影视| 精品国产精品一区二区夜夜嗨| 亚洲一区在线电影| 日本韩国一区二区| 最新久久zyz资源站| 成人丝袜18视频在线观看| 久久久噜噜噜久久中文字幕色伊伊| 日本网站在线观看一区二区三区| 在线一区二区三区| 亚洲图片一区二区| 欧美日韩亚洲丝袜制服| 亚洲黄色av一区| 欧美日韩色一区| 美女视频网站久久| 精品少妇一区二区三区日产乱码| 日韩不卡一区二区三区 | 日韩美女视频一区| 欧美中文字幕久久 | 国产一区二区三区免费观看| 精品福利一区二区三区 | 91成人在线精品| 丝袜美腿亚洲一区| 色偷偷久久人人79超碰人人澡| 成人av电影在线| 国产精品免费丝袜| 精品国产乱码久久久久久图片 | 国产日韩av一区| 91小宝寻花一区二区三区| 亚洲成人精品影院| 久久免费午夜影院| 欧美色成人综合| 久久69国产一区二区蜜臀| 国产精品久久久久久久久动漫| 91黄视频在线| 精品一区二区三区视频| 18成人在线观看| 日韩精品一区二区三区视频在线观看| 国产suv精品一区二区883| 一区二区久久久久| 国产日韩av一区二区| 欧美日韩精品福利| 色综合天天综合网国产成人综合天| 日韩av中文字幕一区二区| 亚洲色大成网站www久久九九| 欧美美女直播网站| 国产精品毛片久久久久久久| 精品国产麻豆免费人成网站| 在线电影一区二区三区| 91网站最新网址| 国产高清久久久久| 精品亚洲porn| 日韩中文欧美在线| 一区二区三区久久久| 国产精品美女一区二区三区| 亚洲精品一区二区在线观看| 欧美视频一区二区在线观看| 91香蕉视频mp4| 91一区二区在线观看| aa级大片欧美| 99免费精品视频| 色综合久久久网| 色婷婷久久久久swag精品| 91福利区一区二区三区| 色先锋久久av资源部| 色丁香久综合在线久综合在线观看| 成人午夜免费电影|