亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区天堂 | 成人动漫一区二区在线| 中文字幕高清不卡| 国产精品亚洲专一区二区三区 | 在线亚洲精品福利网址导航| 国产日产亚洲精品系列| 国产在线播精品第三| 这里只有精品99re| 国产成人亚洲综合色影视| 日韩二区三区四区| 91久久免费观看| 亚洲一区在线免费观看| 91色porny在线视频| 国产精品久久久久影院老司| 在线看日韩精品电影| 亚洲一区二区三区免费视频| 欧美日韩一卡二卡| 久久99久久99精品免视看婷婷 | www.欧美色图| 亚洲精品写真福利| 一本一道久久a久久精品| 亚洲二区在线视频| 国产jizzjizz一区二区| 亚洲狠狠爱一区二区三区| 久久久久久久性| 日韩女优av电影在线观看| 国产美女av一区二区三区| 美国欧美日韩国产在线播放| 色美美综合视频| 精品国产一区二区三区四区四 | 久久久久国产精品麻豆| 久久久美女毛片| 国产精品69毛片高清亚洲| 国产欧美一区二区三区在线老狼| 视频在线观看91| 欧美日韩免费一区二区三区 | 成人动漫一区二区在线| 精品国产乱码久久久久久1区2区| 中文字幕中文字幕在线一区 | 美女视频一区在线观看| 国产精品久久久久影院老司| 中文字幕不卡一区| 欧美性三三影院| 在线播放中文字幕一区| 欧美成人性福生活免费看| 国产欧美日韩中文久久| 99麻豆久久久国产精品免费优播| 亚洲一区二区在线免费观看视频| 日韩一区二区三区在线观看 | 欧美性欧美巨大黑白大战| 亚洲精品一线二线三线无人区| 国产高清亚洲一区| 亚洲一二三四久久| 日韩电影免费一区| 在线观看日韩电影| 色视频一区二区| 精品亚洲aⅴ乱码一区二区三区| 性做久久久久久免费观看欧美| 一区二区三区四区在线播放| 亚洲欧美一区二区三区久本道91| 国产精品成人免费| 亚洲欧美自拍偷拍| 亚洲欧美日韩久久精品| 日韩视频免费观看高清完整版在线观看 | 精品国产免费人成在线观看| 欧美一级理论片| 久久婷婷综合激情| 成人免费视频网站在线观看| 亚洲色图一区二区三区| 国产精品情趣视频| 国产精品久久久久久久久动漫 | 一区二区三区精品久久久| 亚洲免费色视频| 欧美大片顶级少妇| 国产精品私房写真福利视频| 国产女人18水真多18精品一级做| 日韩视频永久免费| 日本韩国欧美三级| 精品制服美女丁香| 成人免费av资源| 色综合色综合色综合色综合色综合 | 欧美日韩国产另类不卡| 日韩精品一区二区三区视频播放| 久久人人超碰精品| 国产精品视频观看| 久久久久久久久久久电影| 5月丁香婷婷综合| 91麻豆国产福利精品| 欧美人伦禁忌dvd放荡欲情| 日韩一级片网址| 国产欧美日韩综合精品一区二区| 欧美经典一区二区三区| 亚洲视频一区二区在线观看| 五月激情六月综合| 精品午夜久久福利影院| 日本韩国欧美一区二区三区| 2021久久国产精品不只是精品| 亚洲色图在线视频| 日本不卡在线视频| 欧美系列在线观看| 欧美电影免费观看高清完整版 | 5858s免费视频成人| 国产欧美日韩在线视频| 亚洲与欧洲av电影| 国产日韩欧美一区二区三区综合| 久久久久久久性| 91官网在线免费观看| 国产精品久久久久三级| 成人av在线资源网| 精品精品国产高清a毛片牛牛| 9191久久久久久久久久久| 欧美在线观看视频一区二区| 欧美mv和日韩mv国产网站| 中文字幕欧美区| 国产精一品亚洲二区在线视频| 色综合中文字幕| 制服.丝袜.亚洲.另类.中文 | 久久综合一区二区| 亚洲日本韩国一区| 911精品国产一区二区在线| 久久一区二区视频| 91亚洲永久精品| 亚洲欧美一区二区三区国产精品| 三级亚洲高清视频| 日韩一卡二卡三卡| 亚洲成人一区在线| 欧美图区在线视频| 国产成人精品在线看| 久久国产精品免费| 99久久综合色| 97久久精品人人做人人爽50路| 欧美电影免费观看高清完整版在 | 国产欧美一区二区在线| 麻豆精品精品国产自在97香蕉| 成人av集中营| 久久精品欧美一区二区三区不卡| 亚洲一区二区欧美日韩| 色综合久久中文字幕| 中文字幕日本乱码精品影院| 91视频在线观看免费| 亚洲一级不卡视频| 欧美色男人天堂| 久久99精品久久久久久| 精品久久久久久久久久久久久久久| 亚洲一卡二卡三卡四卡无卡久久 | 国产精品不卡视频| 99在线视频精品| 国产欧美日韩在线视频| 国产高清在线精品| 国产精品国产a级| 国产高清久久久久| 国产日韩欧美一区二区三区乱码| 国产精品中文欧美| 欧美激情一区二区在线| 国产大片一区二区| 欧美成人一级视频| 奇米888四色在线精品| 99久久er热在这里只有精品15| 久久九九影视网| 亚洲丶国产丶欧美一区二区三区| 在线视频欧美精品| 午夜精品一区二区三区电影天堂| 国产精品资源在线看| 国产精品色噜噜| 成人av免费观看| 亚洲一区二区三区四区不卡| 精品视频一区二区三区免费| 亚洲天堂av老司机| 成人黄色片在线观看| 亚洲国产精品二十页| 精品精品国产高清一毛片一天堂| 欧美一区二区黄色| 国产一区二区三区四区在线观看| 国产三级一区二区三区| 久久精品二区亚洲w码| 91精品国产免费| 久久国产欧美日韩精品| 久久综合精品国产一区二区三区| 国产成人免费高清| 亚洲人成在线播放网站岛国| 欧美三级欧美一级| 一区二区三区欧美激情| 91精品国产美女浴室洗澡无遮挡| 亚洲视频图片小说| 欧美一区二区美女| 狠狠色综合色综合网络| 亚洲视频中文字幕| 欧美日韩国产在线观看| 成人伦理片在线| 亚洲综合成人网| 中文字幕欧美日韩一区| 欧美精品 国产精品| av高清不卡在线| 免费成人在线观看视频|