patch-2.3.46 linux/arch/ppc/kernel/misc.S
Next file: linux/arch/ppc/kernel/mk_defs.c
Previous file: linux/arch/ppc/config.in
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Mon Feb 14 13:37:25 2000
- Orig file:
v2.3.45/linux/arch/ppc/kernel/misc.S
- Orig date:
Sun Feb 13 19:29:03 2000
diff -u --recursive --new-file v2.3.45/linux/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S
@@ -229,7 +229,7 @@
blr
/*
- * Flush a particular page from the DATA cache
+ * Flush a particular page from the data cache to RAM.
* Note: this is necessary because the instruction cache does *not*
* snoop from the data cache.
* This is a no-op on the 601 which has a unified cache.
@@ -241,18 +241,31 @@
rlwinm r5,r5,16,16,31
cmpi 0,r5,1
beqlr /* for 601, do nothing */
- li r4,0x0FFF
- andc r3,r3,r4 /* Get page base address */
li r4,4096/CACHE_LINE_SIZE /* Number of lines in a page */
mtctr r4
- mr r6,r3
0: dcbst 0,r3 /* Write line to ram */
addi r3,r3,CACHE_LINE_SIZE
bdnz 0b
sync
+ blr
+
+/*
+ * Flush a particular page from the instruction cache.
+ * Note: this is necessary because the instruction cache does *not*
+ * snoop from the data cache.
+ * This is a no-op on the 601 which has a unified cache.
+ *
+ * void __flush_icache_page(void *page)
+ */
+_GLOBAL(__flush_icache_page)
+ mfspr r5,PVR
+ rlwinm r5,r5,16,16,31
+ cmpi 0,r5,1
+ beqlr /* for 601, do nothing */
+ li r4,4096/CACHE_LINE_SIZE /* Number of lines in a page */
mtctr r4
-1: icbi 0,r6
- addi r6,r6,CACHE_LINE_SIZE
+1: icbi 0,r3
+ addi r3,r3,CACHE_LINE_SIZE
bdnz 1b
sync
isync
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)