Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] r4k icache flushing for mips64 CVS HEAD
@ 2002-07-01 20:46 Vivien Chappelier
  2002-07-01 22:45 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Vivien Chappelier @ 2002-07-01 20:46 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 194 bytes --]

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.

[-- Attachment #2: Type: TEXT/plain, Size: 2277 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-04 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-01 20:46 [PATCH] r4k icache flushing for mips64 CVS HEAD Vivien Chappelier
2002-07-01 22:45 ` Ralf Baechle
2002-07-04 11:33   ` [PATCH] " Vivien Chappelier
2002-07-04 11:40     ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox