ChangeSet 1.2181.2.56, 2005/03/28 16:19:59-08:00, [EMAIL PROTECTED]
[SPARC64]: FPU disabled trap needs context register patching.
It writes the nucleus context into the secondary context
register so that it can do block stores and loads from
nucleus context. So, we need to patch on cheetah+.
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
entry.S | 24 ++++++++++++++++++++++--
head.S | 2 ++
2 files changed, 24 insertions(+), 2 deletions(-)
diff -Nru a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
--- a/arch/sparc64/kernel/entry.S 2005-04-03 21:16:31 -07:00
+++ b/arch/sparc64/kernel/entry.S 2005-04-03 21:16:31 -07:00
@@ -252,9 +252,11 @@
faddd %f0, %f2, %f4
fmuld %f0, %f2, %f6
ldxa [%g3] ASI_DMMU, %g5
- add %g6, TI_FPREGS + 0xc0, %g2
- stxa %g0, [%g3] ASI_DMMU
+cplus_fpdis_insn_1:
+ sethi %hi(0), %g2
+ stxa %g2, [%g3] ASI_DMMU
membar #Sync
+ add %g6, TI_FPREGS + 0xc0, %g2
faddd %f0, %f2, %f8
fmuld %f0, %f2, %f10
ldda [%g1] ASI_BLK_S, %f32 ! grrr, where is
ASI_BLK_NUCLEUS 8-(
@@ -322,6 +324,24 @@
wrpr %g3, %tstate
wr %g0, FPRS_FEF, %fprs ! clean DU/DL bits
retry
+
+cplus_fpdis_1:
+ sethi %hi(CTX_CHEETAH_PLUS_CTX0), %g2
+
+ .globl cheetah_plus_patch_fpdis
+cheetah_plus_patch_fpdis:
+ /* We configure the dTLB512_0 for 4MB pages and the
+ * dTLB512_1 for 8K pages when in context zero.
+ */
+ sethi %hi(cplus_fpdis_1), %o0
+ sethi %hi(cplus_fpdis_insn_1), %o2
+ lduw [%o0 + %lo(cplus_fpdis_1)], %o1
+ or %o2, %lo(cplus_fpdis_insn_1), %o2
+ stw %o1, [%o2]
+ flush %o2
+
+ retl
+ nop
.align 32
fp_other_bounce:
diff -Nru a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
--- a/arch/sparc64/kernel/head.S 2005-04-03 21:16:31 -07:00
+++ b/arch/sparc64/kernel/head.S 2005-04-03 21:16:31 -07:00
@@ -534,6 +534,8 @@
nop
call cheetah_plus_patch_rtrap
nop
+ call cheetah_plus_patch_fpdis
+ nop
call cheetah_plus_patch_winfixup
nop
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html