patch-2.4.20 linux-2.4.20/arch/sparc64/lib/U3memcpy.S
Next file: linux-2.4.20/arch/sparc64/lib/VIScopy.S
Previous file: linux-2.4.20/arch/sparc64/lib/U3copy_to_user.S
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Thu Nov 28 15:53:12 2002
- Orig file:
linux-2.4.19/arch/sparc64/lib/U3memcpy.S
- Orig date:
Thu Nov 9 15:57:41 2000
diff -urN linux-2.4.19/arch/sparc64/lib/U3memcpy.S linux-2.4.20/arch/sparc64/lib/U3memcpy.S
@@ -7,6 +7,8 @@
#ifdef __KERNEL__
#include <asm/visasm.h>
#include <asm/asi.h>
+#include <asm/dcu.h>
+#include <asm/spitfire.h>
#undef SMALL_COPY_USES_FPU
#else
#define ASI_BLK_P 0xf0
@@ -109,6 +111,16 @@
.align 64
U3memcpy_begin:
+#ifdef __KERNEL__
+ .globl U3memcpy_nop_1_6
+U3memcpy_nop_1_6:
+ ldxa [%g0] ASI_DCU_CONTROL_REG, %g3
+ sethi %uhi(DCU_PE), %o3
+ sllx %o3, 32, %o3
+ or %g3, %o3, %o3
+ stxa %o3, [%g0] ASI_DCU_CONTROL_REG ! Enable P-cache
+ membar #Sync
+#endif
prefetch [%o1 + 0x000], #one_read ! MS Group1
prefetch [%o1 + 0x040], #one_read ! MS Group2
andn %o2, (0x40 - 1), %o4 ! A0
@@ -249,6 +261,13 @@
stda %f16, [%o0] ASI_BLK_P ! MS
add %o0, 0x40, %o0 ! A0
add %o1, 0x40, %o1 ! A1
+#ifdef __KERNEL__
+ .globl U3memcpy_nop_2_3
+U3memcpy_nop_2_3:
+ mov PRIMARY_CONTEXT, %o3
+ stxa %g0, [%o3] ASI_DMMU ! Flush P-cache
+ stxa %g3, [%g0] ASI_DCU_CONTROL_REG ! Disable P-cache
+#endif
membar #Sync ! MS Group26 (7-cycle stall)
/* Now we copy the (len modulo 64) bytes at the end.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)