diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-29 05:38:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-29 05:38:50 -0400 |
commit | e2fdd7fd99dd68b77caaf2a2272b75b5da890de7 (patch) | |
tree | d2b6d3a9b50e4d2ced793430d2b1414f790666a3 /arch/sparc64/mm/ultra.S | |
parent | 4d7ffa49909a830f5f926a3280731d01e29f31fb (diff) |
sparc: Add kgdb support.
Current limitations:
1) On SMP single stepping has some fundamental issues,
shared with other sw single-step architectures such
as mips and arm.
2) On 32-bit sparc we don't support SMP kgdb yet. That
requires some reworking of the IPI mechanisms and
infrastructure on that platform.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/ultra.S')
-rw-r--r-- | arch/sparc64/mm/ultra.S | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index e686a67561af..796e005dad8b 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -676,6 +676,33 @@ xcall_new_mmu_context_version: | |||
676 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint | 676 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint |
677 | retry | 677 | retry |
678 | 678 | ||
679 | #ifdef CONFIG_KGDB | ||
680 | .globl xcall_kgdb_capture | ||
681 | xcall_kgdb_capture: | ||
682 | 661: rdpr %pstate, %g2 | ||
683 | wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate | ||
684 | .section .sun4v_2insn_patch, "ax" | ||
685 | .word 661b | ||
686 | nop | ||
687 | nop | ||
688 | .previous | ||
689 | |||
690 | rdpr %pil, %g2 | ||
691 | wrpr %g0, 15, %pil | ||
692 | sethi %hi(109f), %g7 | ||
693 | ba,pt %xcc, etrap_irq | ||
694 | 109: 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 | ||
705 | |||
679 | #endif /* CONFIG_SMP */ | 706 | #endif /* CONFIG_SMP */ |
680 | 707 | ||
681 | 708 | ||