aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-16 04:41:41 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:12 -0500
commit3d6395cb770b0db9135a853b1742418c99ed2148 (patch)
tree609b1d8f6d3ff13a312c8eb0ce4f070b644b6e05
parent135066a21129760e44a51a7ef31d8c861f8ddace (diff)
[SPARC64]: Fix tl1 trap state capture/dump on SUN4V.
No trap levels above 2 in privileged mode on SUN4V. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/etrap.S6
-rw-r--r--arch/sparc64/kernel/traps.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index a0e7d480e5dc..149383835c25 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -188,6 +188,11 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
188 rdpr %tt, %g3 188 rdpr %tt, %g3
189 stx %g3, [%g2 + STACK_BIAS + 0x38] 189 stx %g3, [%g2 + STACK_BIAS + 0x38]
190 190
191 sethi %hi(is_sun4v), %g3
192 lduw [%g3 + %lo(is_sun4v)], %g3
193 brnz,pn %g3, finish_tl1_capture
194 nop
195
191 wrpr %g0, 3, %tl 196 wrpr %g0, 3, %tl
192 rdpr %tstate, %g3 197 rdpr %tstate, %g3
193 stx %g3, [%g2 + STACK_BIAS + 0x40] 198 stx %g3, [%g2 + STACK_BIAS + 0x40]
@@ -210,6 +215,7 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
210 215
211 stx %g1, [%g2 + STACK_BIAS + 0x80] 216 stx %g1, [%g2 + STACK_BIAS + 0x80]
212 217
218finish_tl1_capture:
213 wrpr %g0, 1, %tl 219 wrpr %g0, 1, %tl
214661: nop 220661: nop
215 .section .sun4v_1insn_patch, "ax" 221 .section .sun4v_1insn_patch, "ax"
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index bedb2f693c76..5956d0a94009 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -73,10 +73,12 @@ struct tl1_traplog {
73 73
74static void dump_tl1_traplog(struct tl1_traplog *p) 74static void dump_tl1_traplog(struct tl1_traplog *p)
75{ 75{
76 int i; 76 int i, limit;
77 77
78 printk("TRAPLOG: Error at trap level 0x%lx, dumping track stack.\n", 78 printk("TRAPLOG: Error at trap level 0x%lx, dumping track stack.\n",
79 p->tl); 79 p->tl);
80
81 limit = (tlb_type == hypervisor) ? 2 : 4;
80 for (i = 0; i < 4; i++) { 82 for (i = 0; i < 4; i++) {
81 printk(KERN_CRIT 83 printk(KERN_CRIT
82 "TRAPLOG: Trap level %d TSTATE[%016lx] TPC[%016lx] " 84 "TRAPLOG: Trap level %d TSTATE[%016lx] TPC[%016lx] "