patch-2.3.30 linux/arch/ppc/treeboot/misc.S
Next file: linux/arch/ppc/treeboot/mkevimg
Previous file: linux/arch/ppc/treeboot/main.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sat Nov 27 15:41:59 1999
- Orig file:
v2.3.29/linux/arch/ppc/treeboot/misc.S
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.3.29/linux/arch/ppc/treeboot/misc.S linux/arch/ppc/treeboot/misc.S
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) Paul Mackerras 1997.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+ .text
+
+/*
+ * Flush the dcache and invalidate the icache for a range of addresses.
+ *
+ * flush_cache(addr, len)
+ */
+ .global flush_cache
+flush_cache:
+ addi 4,4,0x1f /* len = (len + 0x1f) / 0x20 */
+ rlwinm. 4,4,27,5,31
+ mtctr 4
+ beqlr
+1: dcbf 0,3
+ icbi 0,3
+ addi 3,3,0x20
+ bdnz 1b
+ sync
+ isync
+ blr
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)