From 4f99f112570775aa765ac96db4e1d7ecb95b60ce Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 13 Aug 2001 22:44:55 +0000 Subject: [PATCH] In prom_halt(), set the halt restart flags on the current CPU, not the boot CPU. This was the reason reboots on SMP systems could result in weird hangs. Unlike the x86, we do not need to switch back to the boot CPU in order to reboot the machine. See Section 3.4.5 of Part III (Console Interface Architecture) from the Alpha Architecture Reference Manual (aka the Brown Book) for more info. --- sys/alpha/alpha/prom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/alpha/alpha/prom.c b/sys/alpha/alpha/prom.c index b532346f14d..887f991924c 100644 --- a/sys/alpha/alpha/prom.c +++ b/sys/alpha/alpha/prom.c @@ -278,8 +278,7 @@ prom_halt(halt) * Set "boot request" part of the CPU state depending on what * we want to happen when we halt. */ - p = (struct pcs *)((char *)hwrpb + hwrpb->rpb_pcs_off + - (hwrpb->rpb_primary_cpu_id * hwrpb->rpb_pcs_size)); + p = LOCATE_PCS(hwrpb, PCPU_GET(cpuid)); p->pcs_flags &= ~(PCS_RC | PCS_HALT_REQ); if (halt) p->pcs_flags |= PCS_HALT_STAY_HALTED;