Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib
In directory usw-pr-cvs1:/tmp/cvs-serv32333/sparc64/lib
Modified Files:
Makefile PeeCeeI.c U3copy_from_user.S U3copy_in_user.S
U3copy_to_user.S U3memcpy.S VIS.h VISbzero.S VIScopy.S
VIScsum.S VIScsumcopy.S VIScsumcopyusr.S VISmemset.S VISsave.S
atomic.S bitops.S blockops.S debuglocks.c dec_and_lock.S
memcmp.S memscan.S rwlock.S strncmp.S strncpy_from_user.S
Log Message:
synch 2.4.15 commit 46
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: PeeCeeI.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/PeeCeeI.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: U3copy_from_user.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/U3copy_from_user.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: U3copy_in_user.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/U3copy_in_user.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- U3copy_in_user.S 14 Jan 2001 19:45:03 -0000 1.1.1.1
+++ U3copy_in_user.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -231,25 +231,25 @@
.align 64
U3copy_in_user_begin:
- prefetch [%o1 + 0x000], #one_read ! MS Group1
- prefetch [%o1 + 0x040], #one_read ! MS Group2
+ prefetcha [%o1 + 0x000] %asi, #one_read ! MS Group1
+ prefetcha [%o1 + 0x040] %asi, #one_read ! MS Group2
andn %o2, (0x40 - 1), %o4 ! A0
- prefetch [%o1 + 0x080], #one_read ! MS Group3
+ prefetcha [%o1 + 0x080] %asi, #one_read ! MS Group3
cmp %o4, 0x140 ! A0
- prefetch [%o1 + 0x0c0], #one_read ! MS Group4
+ prefetcha [%o1 + 0x0c0] %asi, #one_read ! MS Group4
EX(ldda [%o1 + 0x000] %asi, %f0, add %o2, %g0) ! MS Group5 (%f0 results at G8)
bge,a,pt %icc, 1f ! BR
- prefetch [%o1 + 0x100], #one_read ! MS Group6
+ prefetcha [%o1 + 0x100] %asi, #one_read ! MS Group6
1: EX(ldda [%o1 + 0x008] %asi, %f2, add %o2, %g0) ! AX (%f2 results at G9)
cmp %o4, 0x180 ! A1
bge,a,pt %icc, 1f ! BR
- prefetch [%o1 + 0x140], #one_read ! MS Group7
+ prefetcha [%o1 + 0x140] %asi, #one_read ! MS Group7
1: EX(ldda [%o1 + 0x010] %asi, %f4, add %o2, %g0) ! AX (%f4 results at G10)
cmp %o4, 0x1c0 ! A1
bge,a,pt %icc, 1f ! BR
- prefetch [%o1 + 0x180], #one_read ! MS Group8
+ prefetcha [%o1 + 0x180] %asi, #one_read ! MS Group8
1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12)
EX(ldda [%o1 + 0x018] %asi, %f6, add %o2, %g0) ! AX (%f6 results at G12)
faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13)
@@ -305,7 +305,7 @@
faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19)
EXBLK1(ldda [%o1 + 0x040] %asi, %f0) ! AX (%f0 results at G19)
- prefetch [%o1 + 0x180], #one_read ! MS
+ prefetcha [%o1 + 0x180] %asi, #one_read ! MS
faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20)
subcc %o4, 0x40, %o4 ! A0
add %o1, 0x40, %o1 ! A1
Index: U3copy_to_user.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/U3copy_to_user.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: U3memcpy.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/U3memcpy.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VIS.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VIS.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VISbzero.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VISbzero.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- VISbzero.S 14 Jan 2001 19:44:39 -0000 1.1.1.1
+++ VISbzero.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -83,6 +83,8 @@
.text
.align 32
#ifdef __KERNEL__
+ .globl __bzero_begin
+__bzero_begin:
.globl __bzero, __bzero_noasi
__bzero_noasi:
rd %asi, %g5
@@ -272,3 +274,5 @@
ba,pt %xcc, VISbzerofixup_ret0
sub %o1, %g2, %o0
#endif
+ .globl __bzero_end
+__bzero_end:
Index: VIScopy.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VIScopy.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- VIScopy.S 14 Jan 2001 19:44:43 -0000 1.1.1.1
+++ VIScopy.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -310,17 +310,6 @@
.globl __memcpy
.type __memcpy,@function
- .globl __memcpy_384plus
- .type __memcpy_384plus,@function
-
- .globl __memcpy_16plus
- .type __memcpy_16plus,@function
-
- .globl __memcpy_short
- .type __memcpy_short,@function
-
- .globl __memcpy_entry
- .type __memcpy_entry,@function
memcpy_private:
__memcpy:
memcpy: mov ASI_P, asi_src ! IEU0 Group
@@ -395,7 +384,6 @@
.align 32
#ifdef __KERNEL__
-__memcpy_384plus:
andcc %o0, 7, %g2 ! IEU1 Group
#endif
VIS_enter:
@@ -735,9 +723,6 @@
bleu,pn %xcc, __memcpy_short ! CTI
cmp %o2, (64 * 6) ! IEU1 Group
bgeu,pn %xcc, VIS_enter ! CTI
-#ifdef __KERNEL__
-__memcpy_16plus:
-#endif
andcc %o0, 7, %g2 ! IEU1 Group
sub %o0, %o1, %g5 ! IEU0
andcc %g5, 3, %o5 ! IEU1 Group
Index: VIScsum.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VIScsum.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VIScsumcopy.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VIScsumcopy.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VIScsumcopyusr.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VIScsumcopyusr.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VISmemset.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VISmemset.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: VISsave.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/VISsave.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- VISsave.S 14 Jan 2001 19:44:52 -0000 1.1.1.1
+++ VISsave.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -37,14 +37,15 @@
clr %g1
ba,pt %xcc, 3f
- stb %g3, [%g6 + AOFF_task_thread + AOFF_thread_gsr]
+ stx %g3, [%g6 + AOFF_task_thread + AOFF_thread_gsr]
2: add %g6, %g1, %g3
cmp %o5, FPRS_DU
be,pn %icc, 6f
sll %g1, 3, %g1
stb %o5, [%g3 + AOFF_task_thread + AOFF_thread_fpsaved]
rd %gsr, %g2
- stb %g2, [%g3 + AOFF_task_thread + AOFF_thread_gsr]
+ add %g6, %g1, %g3
+ stx %g2, [%g3 + AOFF_task_thread + AOFF_thread_gsr]
add %g6, %g1, %g2
stx %fsr, [%g2 + AOFF_task_thread + AOFF_thread_xfsr]
@@ -106,7 +107,8 @@
stb %g2, [%g3 + AOFF_task_thread + AOFF_thread_fpsaved]
rd %gsr, %g2
- stb %g2, [%g3 + AOFF_task_thread + AOFF_thread_gsr]
+ add %g6, %g1, %g3
+ stx %g2, [%g3 + AOFF_task_thread + AOFF_thread_gsr]
add %g6, %g1, %g2
stx %fsr, [%g2 + AOFF_task_thread + AOFF_thread_xfsr]
sll %g1, 5, %g1
Index: atomic.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/atomic.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: bitops.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/bitops.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- bitops.S 14 Jan 2001 19:44:59 -0000 1.1.1.1
+++ bitops.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -11,8 +11,8 @@
.globl __bitops_begin
__bitops_begin:
- .globl __test_and_set_bit
-__test_and_set_bit: /* %o0=nr, %o1=addr */
+ .globl ___test_and_set_bit
+___test_and_set_bit: /* %o0=nr, %o1=addr */
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
@@ -30,8 +30,8 @@
2: retl
nop
- .globl __test_and_clear_bit
-__test_and_clear_bit: /* %o0=nr, %o1=addr */
+ .globl ___test_and_clear_bit
+___test_and_clear_bit: /* %o0=nr, %o1=addr */
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
@@ -49,8 +49,8 @@
2: retl
nop
- .globl __test_and_change_bit
-__test_and_change_bit: /* %o0=nr, %o1=addr */
+ .globl ___test_and_change_bit
+___test_and_change_bit: /* %o0=nr, %o1=addr */
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
@@ -68,8 +68,8 @@
nop
nop
- .globl __test_and_set_le_bit
-__test_and_set_le_bit: /* %o0=nr, %o1=addr */
+ .globl ___test_and_set_le_bit
+___test_and_set_le_bit: /* %o0=nr, %o1=addr */
srlx %o0, 5, %g1
mov 1, %g5
sllx %g1, 2, %g3
@@ -87,8 +87,8 @@
2: retl
nop
- .globl __test_and_clear_le_bit
-__test_and_clear_le_bit: /* %o0=nr, %o1=addr */
+ .globl ___test_and_clear_le_bit
+___test_and_clear_le_bit: /* %o0=nr, %o1=addr */
srlx %o0, 5, %g1
mov 1, %g5
sllx %g1, 2, %g3
Index: blockops.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/blockops.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- blockops.S 14 Jan 2001 19:44:34 -0000 1.1.1.1
+++ blockops.S 10 Apr 2002 15:21:24 -0000 1.2
@@ -23,6 +23,14 @@
#define TLBTEMP_ENT2 (62 << 3)
#define TLBTEMP_ENTSZ (1 << 3)
+#if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19)
+#define PAGE_SIZE_REM 0x80
+#elif (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22)
+#define PAGE_SIZE_REM 0x100
+#else
+#error Wrong PAGE_SHIFT specified
+#endif
+
.text
.align 32
@@ -35,7 +43,7 @@
add %o1, 0x40, %o1
ldda [%o1] ASI_BLK_P, %f16
add %o1, 0x40, %o1
- sethi %hi(8192), %o2
+ sethi %hi(PAGE_SIZE), %o2
1: TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
ldda [%o1] ASI_BLK_P, %f32
stda %f48, [%o0] ASI_BLK_P
@@ -53,13 +61,32 @@
stda %f48, [%o0] ASI_BLK_P
sub %o2, 0x40, %o2
add %o1, 0x40, %o1
- cmp %o2, 0x80
+ cmp %o2, PAGE_SIZE_REM
bne,pt %xcc, 1b
add %o0, 0x40, %o0
+#if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22)
+ TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
+ ldda [%o1] ASI_BLK_P, %f32
+ stda %f48, [%o0] ASI_BLK_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ TOUCH(f16, f18, f20, f22, f24, f26, f28, f30)
+ ldda [%o1] ASI_BLK_P, %f0
+ stda %f48, [%o0] ASI_BLK_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ membar #Sync
+ stda %f32, [%o0] ASI_BLK_P
+ add %o0, 0x40, %o0
+ stda %f0, [%o0] ASI_BLK_P
+#else
membar #Sync
stda %f0, [%o0] ASI_BLK_P
add %o0, 0x40, %o0
stda %f16, [%o0] ASI_BLK_P
+#endif
membar #Sync
VISExit
retl
@@ -73,7 +100,7 @@
sub %o0, %g4, %g1
and %o2, %g3, %o0
sethi %hi(TLBTEMP_BASE), %o3
- sethi %uhi(_PAGE_VALID), %g3
+ sethi %uhi(_PAGE_VALID | _PAGE_SZBITS), %g3
sub %o1, %g4, %g2
sllx %g3, 32, %g3
mov TLB_TAG_ACCESS, %o2
@@ -83,6 +110,8 @@
or %g2, %g3, %g2
add %o0, %o3, %o0
add %o0, %o1, %o1
+#define FIX_INSN_1 0x96102068 /* mov (13 << 3), %o3 */
+cheetah_patch_1:
mov TLBTEMP_ENT1, %o3
rdpr %pstate, %g3
wrpr %g3, PSTATE_IE, %pstate
@@ -96,16 +125,14 @@
/* Spitfire Errata #32 workaround */
mov 0x8, %o4
stxa %g0, [%o4] ASI_DMMU
- sethi %hi(empty_zero_page), %o4
- flush %o4
+ membar #Sync
ldxa [%o3] ASI_DTLB_TAG_READ, %o4
/* Spitfire Errata #32 workaround */
mov 0x8, %o5
stxa %g0, [%o5] ASI_DMMU
- sethi %hi(empty_zero_page), %o5
- flush %o5
+ membar #Sync
ldxa [%o3] ASI_DTLB_DATA_ACCESS, %o5
stxa %o0, [%o2] ASI_DMMU
@@ -116,16 +143,14 @@
/* Spitfire Errata #32 workaround */
mov 0x8, %g5
stxa %g0, [%g5] ASI_DMMU
- sethi %hi(empty_zero_page), %g5
- flush %g5
+ membar #Sync
ldxa [%o3] ASI_DTLB_TAG_READ, %g5
/* Spitfire Errata #32 workaround */
mov 0x8, %g7
stxa %g0, [%g7] ASI_DMMU
- sethi %hi(empty_zero_page), %g7
- flush %g7
+ membar #Sync
ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g7
stxa %o1, [%o2] ASI_DMMU
@@ -136,11 +161,112 @@
bne,pn %xcc, copy_page_using_blkcommit
nop
+ rdpr %ver, %g3
+ sllx %g3, 16, %g3
+ srlx %g3, 32 + 16, %g3
+ cmp %g3, 0x14
+ bne,pt %icc, spitfire_copy_user_page
+ nop
+
+cheetah_copy_user_page:
+ mov 121, %o2 ! A0 Group
+ prefetch [%o1 + 0x000], #one_read ! MS
+ prefetch [%o1 + 0x040], #one_read ! MS Group
+ prefetch [%o1 + 0x080], #one_read ! MS Group
+ prefetch [%o1 + 0x0c0], #one_read ! MS Group
+ ldd [%o1 + 0x000], %f0 ! MS Group
+ prefetch [%o1 + 0x100], #one_read ! MS Group
+ ldd [%o1 + 0x008], %f2 ! AX
+ prefetch [%o1 + 0x140], #one_read ! MS Group
+ ldd [%o1 + 0x010], %f4 ! AX
+ prefetch [%o1 + 0x180], #one_read ! MS Group
+ fmovd %f0, %f32 ! FGA Group
+ ldd [%o1 + 0x018], %f6 ! AX
+ fmovd %f2, %f34 ! FGA Group
+ ldd [%o1 + 0x020], %f8 ! MS
+ fmovd %f4, %f36 ! FGA Group
+ ldd [%o1 + 0x028], %f10 ! AX
+ membar #StoreStore ! MS
+ fmovd %f6, %f38 ! FGA Group
+ ldd [%o1 + 0x030], %f12 ! MS
+ fmovd %f8, %f40 ! FGA Group
+ ldd [%o1 + 0x038], %f14 ! AX
+ fmovd %f10, %f42 ! FGA Group
+ ldd [%o1 + 0x040], %f16 ! MS
+1: ldd [%o1 + 0x048], %f2 ! AX (Group)
+ fmovd %f12, %f44 ! FGA
+ ldd [%o1 + 0x050], %f4 ! MS
+ fmovd %f14, %f46 ! FGA Group
+ stda %f32, [%o0] ASI_BLK_P ! MS
+ ldd [%o1 + 0x058], %f6 ! AX
+ fmovd %f16, %f32 ! FGA Group (8-cycle stall)
+ ldd [%o1 + 0x060], %f8 ! MS
+ fmovd %f2, %f34 ! FGA Group
+ ldd [%o1 + 0x068], %f10 ! AX
+ fmovd %f4, %f36 ! FGA Group
+ ldd [%o1 + 0x070], %f12 ! MS
+ fmovd %f6, %f38 ! FGA Group
+ ldd [%o1 + 0x078], %f14 ! AX
+ fmovd %f8, %f40 ! FGA Group
+ ldd [%o1 + 0x080], %f16 ! AX
+ prefetch [%o1 + 0x180], #one_read ! MS
+ fmovd %f10, %f42 ! FGA Group
+ subcc %o2, 1, %o2 ! A0
+ add %o0, 0x40, %o0 ! A1
+ bne,pt %xcc, 1b ! BR
+ add %o1, 0x40, %o1 ! A0 Group
+
+ mov 5, %o2 ! A0 Group
+1: ldd [%o1 + 0x048], %f2 ! AX
+ fmovd %f12, %f44 ! FGA
+ ldd [%o1 + 0x050], %f4 ! MS
+ fmovd %f14, %f46 ! FGA Group
+ stda %f32, [%o0] ASI_BLK_P ! MS
+ ldd [%o1 + 0x058], %f6 ! AX
+ fmovd %f16, %f32 ! FGA Group (8-cycle stall)
+ ldd [%o1 + 0x060], %f8 ! MS
+ fmovd %f2, %f34 ! FGA Group
+ ldd [%o1 + 0x068], %f10 ! AX
+ fmovd %f4, %f36 ! FGA Group
+ ldd [%o1 + 0x070], %f12 ! MS
+ fmovd %f6, %f38 ! FGA Group
+ ldd [%o1 + 0x078], %f14 ! AX
+ fmovd %f8, %f40 ! FGA Group
+ ldd [%o1 + 0x080], %f16 ! MS
+ fmovd %f10, %f42 ! FGA Group
+ subcc %o2, 1, %o2 ! A0
+ add %o0, 0x40, %o0 ! A1
+ bne,pt %xcc, 1b ! BR
+ add %o1, 0x40, %o1 ! A0 Group
+
+ ldd [%o1 + 0x048], %f2 ! AX
+ fmovd %f12, %f44 ! FGA
+ ldd [%o1 + 0x050], %f4 ! MS
+ fmovd %f14, %f46 ! FGA Group
+ stda %f32, [%o0] ASI_BLK_P ! MS
+ ldd [%o1 + 0x058], %f6 ! AX
+ fmovd %f16, %f32 ! FGA Group (8-cycle stall)
+ ldd [%o1 + 0x060], %f8 ! MS
+ fmovd %f2, %f34 ! FGA Group
+ ldd [%o1 + 0x068], %f10 ! AX
+ fmovd %f4, %f36 ! FGA Group
+ ldd [%o1 + 0x070], %f12 ! MS
+ fmovd %f6, %f38 ! FGA Group
+ add %o0, 0x40, %o0 ! A0
+ ldd [%o1 + 0x078], %f14 ! AX
+ fmovd %f8, %f40 ! FGA Group
+ fmovd %f10, %f42 ! FGA Group
+ fmovd %f12, %f44 ! FGA Group
+ fmovd %f14, %f46 ! FGA Group
+ stda %f32, [%o0] ASI_BLK_P ! MS
+ ba,a,pt %xcc, copy_user_page_continue
+
+spitfire_copy_user_page:
ldda [%o1] ASI_BLK_P, %f0
add %o1, 0x40, %o1
ldda [%o1] ASI_BLK_P, %f16
add %o1, 0x40, %o1
- sethi %hi(8192), %o2
+ sethi %hi(PAGE_SIZE), %o2
1: TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
ldda [%o1] ASI_BLK_P, %f32
stda %f48, [%o0] ASI_BLK_P
@@ -158,13 +284,32 @@
stda %f48, [%o0] ASI_BLK_P
sub %o2, 0x40, %o2
add %o1, 0x40, %o1
- cmp %o2, 0x80
+ cmp %o2, PAGE_SIZE_REM
bne,pt %xcc, 1b
add %o0, 0x40, %o0
+#if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22)
+ TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
+ ldda [%o1] ASI_BLK_P, %f32
+ stda %f48, [%o0] ASI_BLK_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ TOUCH(f16, f18, f20, f22, f24, f26, f28, f30)
+ ldda [%o1] ASI_BLK_P, %f0
+ stda %f48, [%o0] ASI_BLK_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ membar #Sync
+ stda %f32, [%o0] ASI_BLK_P
+ add %o0, 0x40, %o0
+ stda %f0, [%o0] ASI_BLK_P
+#else
membar #Sync
stda %f0, [%o0] ASI_BLK_P
add %o0, 0x40, %o0
stda %f16, [%o0] ASI_BLK_P
+#endif
copy_user_page_continue:
membar #Sync
VISExit
@@ -187,7 +332,7 @@
add %o1, 0x40, %o1
ldda [%o1] ASI_BLK_P, %f16
add %o1, 0x40, %o1
- sethi %hi(8192), %o2
+ sethi %hi(PAGE_SIZE), %o2
1: TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
ldda [%o1] ASI_BLK_P, %f32
stda %f48, [%o0] ASI_BLK_COMMIT_P
@@ -205,14 +350,34 @@
stda %f48, [%o0] ASI_BLK_COMMIT_P
sub %o2, 0x40, %o2
add %o1, 0x40, %o1
- cmp %o2, 0x80
+ cmp %o2, PAGE_SIZE_REM
bne,pt %xcc, 1b
add %o0, 0x40, %o0
+#if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22)
+ TOUCH(f0, f2, f4, f6, f8, f10, f12, f14)
+ ldda [%o1] ASI_BLK_P, %f32
+ stda %f48, [%o0] ASI_BLK_COMMIT_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ TOUCH(f16, f18, f20, f22, f24, f26, f28, f30)
+ ldda [%o1] ASI_BLK_P, %f0
+ stda %f48, [%o0] ASI_BLK_COMMIT_P
+ add %o1, 0x40, %o1
+ sub %o2, 0x40, %o2
+ add %o0, 0x40, %o0
+ membar #Sync
+ stda %f32, [%o0] ASI_BLK_COMMIT_P
+ add %o0, 0x40, %o0
+ ba,pt %xcc, copy_user_page_continue
+ stda %f0, [%o0] ASI_BLK_COMMIT_P
+#else
membar #Sync
stda %f0, [%o0] ASI_BLK_COMMIT_P
add %o0, 0x40, %o0
ba,pt %xcc, copy_user_page_continue
stda %f16, [%o0] ASI_BLK_COMMIT_P
+#endif
.align 32
.globl _clear_page
@@ -231,12 +396,14 @@
sub %o0, %g4, %g1
and %o1, %g3, %o0
mov TLB_TAG_ACCESS, %o2
- sethi %uhi(_PAGE_VALID), %g3
+ sethi %uhi(_PAGE_VALID | _PAGE_SZBITS), %g3
sethi %hi(TLBTEMP_BASE), %o3
sllx %g3, 32, %g3
or %g3, (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_L | _PAGE_W), %g3
or %g1, %g3, %g1
add %o0, %o3, %o0
+#define FIX_INSN_2 0x96102070 /* mov (14 << 3), %o3 */
+cheetah_patch_2:
mov TLBTEMP_ENT2, %o3
rdpr %pstate, %g3
wrpr %g3, PSTATE_IE, %pstate
@@ -244,16 +411,14 @@
/* Spitfire Errata #32 workaround */
mov 0x8, %g5
stxa %g0, [%g5] ASI_DMMU
- sethi %hi(empty_zero_page), %g5
- flush %g5
+ membar #Sync
ldxa [%o3] ASI_DTLB_TAG_READ, %g5
/* Spitfire Errata #32 workaround */
mov 0x8, %g7
stxa %g0, [%g7] ASI_DMMU
- sethi %hi(empty_zero_page), %g7
- flush %g7
+ membar #Sync
ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g7
stxa %o0, [%o2] ASI_DMMU
@@ -265,7 +430,7 @@
clear_page_common:
membar #StoreLoad | #StoreStore | #LoadStore ! LSU Group
fzero %f0 ! FPA Group
- mov 32, %o1 ! IEU0
+ mov PAGE_SIZE/256, %o1 ! IEU0
fzero %f2 ! FPA Group
faddd %f0, %f2, %f4 ! FPA Group
fmuld %f0, %f2, %f6 ! FPM
@@ -299,3 +464,24 @@
membar #Sync
jmpl %o7 + 0x8, %g0
wrpr %g3, 0x0, %pstate
+
+ .globl cheetah_patch_pgcopyops
+cheetah_patch_pgcopyops:
+ sethi %hi(FIX_INSN_1), %g1
+ or %g1, %lo(FIX_INSN_1), %g1
+ sethi %hi(cheetah_patch_1), %g2
+ or %g2, %lo(cheetah_patch_1), %g2
+ stw %g1, [%g2]
+ flush %g2
+ sethi %hi(FIX_INSN_2), %g1
+ or %g1, %lo(FIX_INSN_2), %g1
+ sethi %hi(cheetah_patch_2), %g2
+ or %g2, %lo(cheetah_patch_2), %g2
+ stw %g1, [%g2]
+ flush %g2
+ retl
+ nop
+
+#undef FIX_INSN1
+#undef FIX_INSN2
+#undef PAGE_SIZE_REM
Index: debuglocks.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/debuglocks.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- debuglocks.c 14 Jan 2001 19:44:53 -0000 1.1.1.1
+++ debuglocks.c 10 Apr 2002 15:21:24 -0000 1.2
@@ -123,14 +123,14 @@
membar("#LoadLoad");
}
/* Try once to increment the counter. */
- __asm__ __volatile__("
- ldx [%0], %%g5
- brlz,a,pn %%g5, 2f
- mov 1, %0
- add %%g5, 1, %%g7
- casx [%0], %%g5, %%g7
- sub %%g5, %%g7, %0
-2:" : "=r" (val)
+ __asm__ __volatile__(
+" ldx [%0], %%g5\n"
+" brlz,a,pn %%g5, 2f\n"
+" mov 1, %0\n"
+" add %%g5, 1, %%g7\n"
+" casx [%0], %%g5, %%g7\n"
+" sub %%g5, %%g7, %0\n"
+"2:" : "=r" (val)
: "0" (&(rw->lock))
: "g5", "g7", "memory");
membar("#StoreLoad | #StoreStore");
@@ -151,13 +151,13 @@
rw->reader_pc[cpu] = 0;
runlock_again:
/* Spin trying to decrement the counter using casx. */
- __asm__ __volatile__("
- ldx [%0], %%g5
- sub %%g5, 1, %%g7
- casx [%0], %%g5, %%g7
- membar #StoreLoad | #StoreStore
- sub %%g5, %%g7, %0
-" : "=r" (val)
+ __asm__ __volatile__(
+" ldx [%0], %%g5\n"
+" sub %%g5, 1, %%g7\n"
+" casx [%0], %%g5, %%g7\n"
+" membar #StoreLoad | #StoreStore\n"
+" sub %%g5, %%g7, %0\n"
+ : "=r" (val)
: "0" (&(rw->lock))
: "g5", "g7", "memory");
if (val) {
@@ -187,18 +187,18 @@
}
/* Try to acuire the write bit. */
- __asm__ __volatile__("
- mov 1, %%g3
- sllx %%g3, 63, %%g3
- ldx [%0], %%g5
- brlz,pn %%g5, 1f
- or %%g5, %%g3, %%g7
- casx [%0], %%g5, %%g7
- membar #StoreLoad | #StoreStore
- ba,pt %%xcc, 2f
- sub %%g5, %%g7, %0
-1: mov 1, %0
-2:" : "=r" (val)
+ __asm__ __volatile__(
+" mov 1, %%g3\n"
+" sllx %%g3, 63, %%g3\n"
+" ldx [%0], %%g5\n"
+" brlz,pn %%g5, 1f\n"
+" or %%g5, %%g3, %%g7\n"
+" casx [%0], %%g5, %%g7\n"
+" membar #StoreLoad | #StoreStore\n"
+" ba,pt %%xcc, 2f\n"
+" sub %%g5, %%g7, %0\n"
+"1: mov 1, %0\n"
+"2:" : "=r" (val)
: "0" (&(rw->lock))
: "g3", "g5", "g7", "memory");
if (val) {
@@ -217,15 +217,15 @@
show_write(str, rw, caller);
stuck = INIT_STUCK;
}
- __asm__ __volatile__("
- mov 1, %%g3
- sllx %%g3, 63, %%g3
-1: ldx [%0], %%g5
- andn %%g5, %%g3, %%g7
- casx [%0], %%g5, %%g7
- cmp %%g5, %%g7
- bne,pn %%xcc, 1b
- membar #StoreLoad | #StoreStore"
+ __asm__ __volatile__(
+" mov 1, %%g3\n"
+" sllx %%g3, 63, %%g3\n"
+"1: ldx [%0], %%g5\n"
+" andn %%g5, %%g3, %%g7\n"
+" casx [%0], %%g5, %%g7\n"
+" cmp %%g5, %%g7\n"
+" bne,pn %%xcc, 1b\n"
+" membar #StoreLoad | #StoreStore"
: /* no outputs */
: "r" (&(rw->lock))
: "g3", "g5", "g7", "cc", "memory");
@@ -255,15 +255,15 @@
rw->writer_pc = 0;
rw->writer_cpu = NO_PROC_ID;
wlock_again:
- __asm__ __volatile__("
- mov 1, %%g3
- sllx %%g3, 63, %%g3
- ldx [%0], %%g5
- andn %%g5, %%g3, %%g7
- casx [%0], %%g5, %%g7
- membar #StoreLoad | #StoreStore
- sub %%g5, %%g7, %0
-" : "=r" (val)
+ __asm__ __volatile__(
+" mov 1, %%g3\n"
+" sllx %%g3, 63, %%g3\n"
+" ldx [%0], %%g5\n"
+" andn %%g5, %%g3, %%g7\n"
+" casx [%0], %%g5, %%g7\n"
+" membar #StoreLoad | #StoreStore\n"
+" sub %%g5, %%g7, %0\n"
+ : "=r" (val)
: "0" (&(rw->lock))
: "g3", "g5", "g7", "memory");
if (val) {
Index: dec_and_lock.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/dec_and_lock.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: memcmp.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/memcmp.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: memscan.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/memscan.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: rwlock.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/rwlock.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: strncmp.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/strncmp.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: strncpy_from_user.S
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/strncpy_from_user.S,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
|