sparc: Add kgdb support.
[deliverable/linux.git] / arch / sparc64 / mm / ultra.S
index e686a67561af081aacc6e22fb8c4768508d4f096..796e005dad8bb1f622d4a7ff4d4a9f6a5adf468d 100644 (file)
@@ -676,6 +676,33 @@ xcall_new_mmu_context_version:
        wr              %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint
        retry
 
+#ifdef CONFIG_KGDB
+       .globl          xcall_kgdb_capture
+xcall_kgdb_capture:
+661:   rdpr            %pstate, %g2
+       wrpr            %g2, PSTATE_IG | PSTATE_AG, %pstate
+       .section        .sun4v_2insn_patch, "ax"
+       .word           661b
+       nop
+       nop
+       .previous
+
+       rdpr            %pil, %g2
+       wrpr            %g0, 15, %pil
+       sethi           %hi(109f), %g7
+       ba,pt           %xcc, etrap_irq
+109:    or             %g7, %lo(109b), %g7
+#ifdef CONFIG_TRACE_IRQFLAGS
+       call            trace_hardirqs_off
+        nop
+#endif
+       call            smp_kgdb_capture_client
+        add            %sp, PTREGS_OFF, %o0
+       /* Has to be a non-v9 branch due to the large distance. */
+       ba              rtrap_xcall
+        ldx            [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
+#endif
+
 #endif /* CONFIG_SMP */
 
 
This page took 0.023591 seconds and 5 git commands to generate.