Commit 3d6395cb authored by David S. Miller's avatar David S. Miller

[SPARC64]: Fix tl1 trap state capture/dump on SUN4V.

No trap levels above 2 in privileged mode on SUN4V.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 135066a2
...@@ -188,6 +188,11 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself. ...@@ -188,6 +188,11 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
rdpr %tt, %g3 rdpr %tt, %g3
stx %g3, [%g2 + STACK_BIAS + 0x38] stx %g3, [%g2 + STACK_BIAS + 0x38]
sethi %hi(is_sun4v), %g3
lduw [%g3 + %lo(is_sun4v)], %g3
brnz,pn %g3, finish_tl1_capture
nop
wrpr %g0, 3, %tl wrpr %g0, 3, %tl
rdpr %tstate, %g3 rdpr %tstate, %g3
stx %g3, [%g2 + STACK_BIAS + 0x40] 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,6 +215,7 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
stx %g1, [%g2 + STACK_BIAS + 0x80] stx %g1, [%g2 + STACK_BIAS + 0x80]
finish_tl1_capture:
wrpr %g0, 1, %tl wrpr %g0, 1, %tl
661: nop 661: nop
.section .sun4v_1insn_patch, "ax" .section .sun4v_1insn_patch, "ax"
......
...@@ -73,10 +73,12 @@ struct tl1_traplog { ...@@ -73,10 +73,12 @@ struct tl1_traplog {
static void dump_tl1_traplog(struct tl1_traplog *p) static void dump_tl1_traplog(struct tl1_traplog *p)
{ {
int i; int i, limit;
printk("TRAPLOG: Error at trap level 0x%lx, dumping track stack.\n", printk("TRAPLOG: Error at trap level 0x%lx, dumping track stack.\n",
p->tl); p->tl);
limit = (tlb_type == hypervisor) ? 2 : 4;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
printk(KERN_CRIT printk(KERN_CRIT
"TRAPLOG: Trap level %d TSTATE[%016lx] TPC[%016lx] " "TRAPLOG: Trap level %d TSTATE[%016lx] TPC[%016lx] "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment