diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 20:33:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 20:33:51 +0000 |
commit | c335a0466bbcc58554afda172e71ddeba142858c (patch) | |
tree | 3c99ad962b5e64711002f9d4fc81b1002c621935 | |
parent | d1d03717316dca4efc8d465aadf2eeffe03143ef (diff) |
Force other processors to spin when one is in ddb.
-rw-r--r-- | sys/arch/m88k/m88k/db_interface.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m188_machdep.c | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/arch/m88k/m88k/db_interface.c b/sys/arch/m88k/m88k/db_interface.c index ed3c1e3b7d3..005673618c6 100644 --- a/sys/arch/m88k/m88k/db_interface.c +++ b/sys/arch/m88k/m88k/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.6 2007/03/21 19:32:17 miod Exp $ */ +/* $OpenBSD: db_interface.c,v 1.7 2007/05/19 20:33:49 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -409,6 +409,7 @@ m88k_db_trap(type, frame) curcpu()->ci_ddb_state = CI_DDB_ENTERDDB; __mp_lock(&ddb_mp_lock); curcpu()->ci_ddb_state = CI_DDB_INDDB; + m88k_broadcast_ipi(CI_IPI_DDB); /* pause other processors */ #endif ddb_regs = frame->tf_regs; diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c index 1c030dea0bf..b4150e6cc55 100644 --- a/sys/arch/mvme88k/mvme88k/m188_machdep.c +++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m188_machdep.c,v 1.30 2007/05/19 17:03:49 miod Exp $ */ +/* $OpenBSD: m188_machdep.c,v 1.31 2007/05/19 20:33:50 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -362,6 +362,17 @@ m188_ipi_handler(struct trapframe *eframe) int ipi = ci->ci_ipi; int spl = m188_curspl[ci->ci_cpuid]; + if (ipi & CI_IPI_DDB) { +#ifdef DDB + /* + * Another processor has entered DDB. Spin on the ddb lock + * until it is done. + */ + extern struct __mp_lock ddb_mp_lock; + __mp_lock(&ddb_mp_lock); + __mp_unlock(&ddb_mp_lock); +#endif + } if (ipi & CI_IPI_NOTIFY) { /* nothing to do */ } |