aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-19 02:51:57 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-19 02:51:57 -0400
commit42cc77c861e8e850e86252bb5b1e12e006261973 (patch)
tree422d0619783e95d95d682775305d0dfdac72a366 /arch/sparc/mm
parent1c339eb183bb48095feaa46057ac4f4f0603dbf9 (diff)
sparc64: Reschedule KGDB capture to a software interrupt.
Otherwise it might interrupt switch_to() midstream and use half-cooked register window state. Reported-by: Chris Torek <chris.torek@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/ultra.S24
1 files changed, 2 insertions, 22 deletions
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S
index 80c788ec7c32..b57a5942ba64 100644
--- a/arch/sparc/mm/ultra.S
+++ b/arch/sparc/mm/ultra.S
@@ -679,28 +679,8 @@ xcall_new_mmu_context_version:
679#ifdef CONFIG_KGDB 679#ifdef CONFIG_KGDB
680 .globl xcall_kgdb_capture 680 .globl xcall_kgdb_capture
681xcall_kgdb_capture: 681xcall_kgdb_capture:
682661: rdpr %pstate, %g2 682 wr %g0, (1 << PIL_KGDB_CAPTURE), %set_softint
683 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate 683 retry
684 .section .sun4v_2insn_patch, "ax"
685 .word 661b
686 nop
687 nop
688 .previous
689
690 rdpr %pil, %g2
691 wrpr %g0, PIL_NORMAL_MAX, %pil
692 sethi %hi(109f), %g7
693 ba,pt %xcc, etrap_irq
694109: or %g7, %lo(109b), %g7
695#ifdef CONFIG_TRACE_IRQFLAGS
696 call trace_hardirqs_off
697 nop
698#endif
699 call smp_kgdb_capture_client
700 add %sp, PTREGS_OFF, %o0
701 /* Has to be a non-v9 branch due to the large distance. */
702 ba rtrap_xcall
703 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
704#endif 684#endif
705 685
706#endif /* CONFIG_SMP */ 686#endif /* CONFIG_SMP */