From fcdbc29795e5e548d780296c1a95d5981635ed5d Mon Sep 17 00:00:00 2001 From: mhitch Date: Wed, 7 Jul 2004 02:46:14 +0000 Subject: [PATCH] After sending the IPI to halt other CPUs, clear cpus_paused to ensure that the other CPUs resume execution. If the halt was initiated from DDB, the CPUs will not have been resume execution and will never halt. If one of the paused CPUs is the primary CPU, the system will hang. Fixes PR#26159. --- sys/arch/alpha/alpha/machdep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 7591f963b69e..3d62e6a5ee3f 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.282 2004/03/24 15:34:46 atatat Exp $ */ +/* $NetBSD: machdep.c,v 1.283 2004/07/07 02:46:14 mhitch Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.282 2004/03/24 15:34:46 atatat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.283 2004/07/07 02:46:14 mhitch Exp $"); #include #include @@ -1023,6 +1023,9 @@ cpu_reboot(howto, bootstr) */ alpha_broadcast_ipi(ALPHA_IPI_HALT); + /* Ensure any CPUs paused by DDB resume execution so they can halt */ + cpus_paused = 0; + for (i = 0; i < 10000; i++) { alpha_mb(); if (cpus_running == wait_mask)