patch-2.4.20 linux-2.4.20/arch/sparc64/lib/U3copy_to_user.S
Next file: linux-2.4.20/arch/sparc64/lib/U3memcpy.S
Previous file: linux-2.4.20/arch/sparc64/lib/U3copy_from_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/U3copy_to_user.S
- Orig date:
Thu Nov 9 15:57:41 2000
diff -urN linux-2.4.19/arch/sparc64/lib/U3copy_to_user.S linux-2.4.20/arch/sparc64/lib/U3copy_to_user.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
#define EXNV(x,y,a,b) \
98: x,y; \
@@ -228,6 +230,16 @@
.align 64
U3copy_to_user_begin:
+#ifdef __KERNEL__
+ .globl U3copy_to_user_nop_1_6
+U3copy_to_user_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
@@ -368,6 +380,13 @@
EXBLK4(stda %f16, [%o0] ASI_BLK_AIUS) ! MS
add %o0, 0x40, %o0 ! A0
add %o1, 0x40, %o1 ! A1
+#ifdef __KERNEL__
+ .globl U3copy_to_user_nop_2_3
+U3copy_to_user_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)