Hi, This fixes icache flushing for the r4xx0 processor in the current (CVS HEAD) 2.5.1 tree. The flush_cache_all function does nothing there, that's why I moved it to flush_cache_l1. Vivien.
diff -Naur /share/linux.cvs/arch/mips64/mm/loadmmu.c linux.patched/arch/mips64/mm/loadmmu.c --- /share/linux.cvs/arch/mips64/mm/loadmmu.c Sun Mar 3 19:50:39 2002 +++ linux.patched/arch/mips64/mm/loadmmu.c Thu May 16 23:12:21 2002 @@ -30,11 +30,14 @@ void (*_flush_cache_page)(struct vm_area_struct *vma, unsigned long page); void (*_flush_page_to_ram)(struct page * page); +void (*_flush_icache_range)(unsigned long start, unsigned long end); +void (*_flush_icache_page)(struct vm_area_struct *vma, struct page *page); +void (*_flush_icache_all)(void); + /* MIPS specific cache operations */ void (*_flush_cache_sigtramp)(unsigned long addr); void (*_flush_cache_l2)(void); void (*_flush_cache_l1)(void); - /* DMA cache operations. */ void (*_dma_cache_wback_inv)(unsigned long start, unsigned long size); diff -Naur /share/linux.cvs/include/asm-mips64/pgtable.h linux.patched/include/asm-mips64/pgtable.h --- /share/linux.cvs/include/asm-mips64/pgtable.h Sun May 5 15:03:39 2002 +++ linux.patched/include/asm-mips64/pgtable.h Thu May 16 23:01:46 2002 @@ -60,12 +60,22 @@ #else +extern void (*_flush_icache_all)(void); +extern void (*_flush_icache_range)(unsigned long start, unsigned long end); +extern void (*_flush_icache_page)(struct vm_area_struct *vma, struct page *page); + #define flush_cache_mm(mm) _flush_cache_mm(mm) #define flush_cache_range(mm,start,end) _flush_cache_range(mm,start,end) #define flush_cache_page(vma,page) _flush_cache_page(vma, page) #define flush_page_to_ram(page) _flush_page_to_ram(page) #define flush_icache_range(start, end) _flush_icache_range(start, end) #define flush_icache_page(vma, page) _flush_icache_page(vma, page) +#ifdef CONFIG_VTAG_ICACHE +#define flush_icache_all() _flush_icache_all() +#else +#define flush_icache_all() do { } while(0) +#endif + #endif /* !CONFIG_CPU_R10000 */ diff -Naur linux/arch/mips64/mm/r4xx0.c linux.patch/arch/mips64/mm/r4xx0.c --- linux/arch/mips64/mm/r4xx0.c Mon Jul 1 21:36:37 2002 +++ linux.patch/arch/mips64/mm/r4xx0.c Mon Jul 1 22:22:15 2002 @@ -1625,7 +1625,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end) { - flush_cache_all(); + flush_cache_l1(); } static void