summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-02-01 21:18:25 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-02-01 21:18:25 +0000
commit103ed7831247db25e3a23f90c977ff332bc92c37 (patch)
tree780c63214cca8f4e97bf419bf9b5bf17530498af /sys/arch/alpha
parenta5577692aa8098b62f19907edae981c4d697513e (diff)
Allow MP_LOCKDEBUG kernels to get tracebacks from other processors when
entering ddb. No change for !MP_LOCKDEBUG kernels.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/debug.s53
-rw-r--r--sys/arch/alpha/include/intr.h7
-rw-r--r--sys/arch/alpha/include/lock.h6
3 files changed, 60 insertions, 6 deletions
diff --git a/sys/arch/alpha/alpha/debug.s b/sys/arch/alpha/alpha/debug.s
index b0ff7f4407b..810598126f9 100644
--- a/sys/arch/alpha/alpha/debug.s
+++ b/sys/arch/alpha/alpha/debug.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug.s,v 1.7 2014/01/26 17:40:09 miod Exp $ */
+/* $OpenBSD: debug.s,v 1.8 2014/02/01 21:18:19 miod Exp $ */
/* $NetBSD: debug.s,v 1.5 1999/06/18 18:11:56 thorpej Exp $ */
/*-
@@ -119,3 +119,54 @@ NESTED_NOPROFILE(alpha_debug, 5, 32, ra, IM_RA|IM_S0, 0)
lda sp, 32(sp) /* pop stack frame */
RET
END(alpha_debug)
+
+#ifdef MP_LOCKDEBUG
+NESTED(alpha_ipi_process_with_frame, 2, 8 * FRAME_SIZE, ra, IM_RA, 0)
+ .set noat
+ lda sp, -(8 * FRAME_SIZE)(sp) /* set up stack frame */
+
+ stq v0,(FRAME_V0*8)(sp)
+ stq t0,(FRAME_T0*8)(sp)
+ stq t1,(FRAME_T1*8)(sp)
+ stq t2,(FRAME_T2*8)(sp)
+ stq t3,(FRAME_T3*8)(sp)
+ stq t4,(FRAME_T4*8)(sp)
+ stq t5,(FRAME_T5*8)(sp)
+ stq t6,(FRAME_T6*8)(sp)
+ stq t7,(FRAME_T7*8)(sp)
+ stq s0,(FRAME_S0*8)(sp)
+ stq s1,(FRAME_S1*8)(sp)
+ stq s2,(FRAME_S2*8)(sp)
+ stq s3,(FRAME_S3*8)(sp)
+ stq s4,(FRAME_S4*8)(sp)
+ stq s5,(FRAME_S5*8)(sp)
+ stq s6,(FRAME_S6*8)(sp)
+ stq a3,(FRAME_A3*8)(sp)
+ stq a4,(FRAME_A4*8)(sp)
+ stq a5,(FRAME_A5*8)(sp)
+ stq t8,(FRAME_T8*8)(sp)
+ stq t9,(FRAME_T9*8)(sp)
+ stq t10,(FRAME_T10*8)(sp)
+ stq t11,(FRAME_T11*8)(sp)
+ stq ra,(FRAME_RA*8)(sp)
+ stq t12,(FRAME_T12*8)(sp)
+ stq at_reg,(FRAME_AT*8)(sp)
+ lda a1,(8*FRAME_SIZE)(sp)
+ stq a1,(FRAME_SP*8)(sp)
+
+ stq zero,(FRAME_PS*8)(sp)
+ stq zero,(FRAME_PC*8)(sp)
+ stq zero,(FRAME_GP*8)(sp)
+ stq zero,(FRAME_A0*8)(sp)
+ stq zero,(FRAME_A1*8)(sp)
+ stq zero,(FRAME_A2*8)(sp)
+
+ mov sp, a1
+ CALL(alpha_ipi_process)
+
+ ldq ra,(FRAME_RA*8)(sp)
+ lda sp, (8 * FRAME_SIZE)(sp) /* pop stack frame */
+ RET
+ END(alpha_ipi_process_with_frame)
+ .set at
+#endif
diff --git a/sys/arch/alpha/include/intr.h b/sys/arch/alpha/include/intr.h
index eb92b1e81f8..92bd51c1abc 100644
--- a/sys/arch/alpha/include/intr.h
+++ b/sys/arch/alpha/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.41 2014/01/26 17:40:11 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.42 2014/02/01 21:18:24 miod Exp $ */
/* $NetBSD: intr.h,v 1.26 2000/06/03 20:47:41 thorpej Exp $ */
/*-
@@ -205,6 +205,11 @@ struct cpu_info;
struct trapframe;
void alpha_ipi_process(struct cpu_info *, struct trapframe *);
+#ifdef MP_LOCKDEBUG
+void alpha_ipi_process_with_frame(struct cpu_info *);
+#else
+#define alpha_ipi_process_with_frame(ci) alpha_ipi_process((ci), NULL)
+#endif
void alpha_send_ipi(unsigned long, unsigned long);
void alpha_broadcast_ipi(unsigned long);
void alpha_multicast_ipi(unsigned long, unsigned long);
diff --git a/sys/arch/alpha/include/lock.h b/sys/arch/alpha/include/lock.h
index fcaf38cb4c6..56d4a70898a 100644
--- a/sys/arch/alpha/include/lock.h
+++ b/sys/arch/alpha/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.5 2013/12/22 18:32:40 miod Exp $ */
+/* $OpenBSD: lock.h,v 1.6 2014/02/01 21:18:24 miod Exp $ */
/* $NetBSD: lock.h,v 1.16 2001/12/17 23:34:57 thorpej Exp $ */
/*-
@@ -54,10 +54,8 @@ do { \
int __s; \
\
if (__ci->ci_ipis != 0) { \
- /* printf("CPU %lu has IPIs pending\n", \
- __ci->ci_cpuid); */ \
__s = splipi(); \
- alpha_ipi_process(__ci, NULL); \
+ alpha_ipi_process_with_frame(__ci); \
splx(__s); \
} \
} while (0)