reboot/shutdown on MP macppcs

Martin Husemann <[email protected]> Tue, 31 May 2022 20:18:14 +0200
Newsgroups gmane.os.netbsd.ports.macppc
Message-ID <[email protected]>
Hey folks,

I sometimes see my MP macppc machines not properly shutdown or reboot - I
think (but have no fully verified) this happens when the boot cpu is
shutdown before some other CPU (maybe due to OF implementation details?)

I looked at the code and wondered about the open coded very simple
version of cpu_halt_others(). Is there a reason not to call that?

But even with this change we seem to nowhere care about which cpu
does the last part of cpu_reboot - is this supposed to work on all of
them equally well?

Martin

Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/macppc/machdep.c,v
retrieving revision 1.174
diff -u -p -r1.174 machdep.c
--- machdep.c	10 Mar 2021 19:45:41 -0000	1.174
+++ machdep.c	31 May 2022 18:11:39 -0000
@@ -233,7 +233,7 @@ cpu_reboot(int howto, char *what)
 
 #ifdef MULTIPROCESSOR
 	/* Halt other CPU */
-	cpu_send_ipi(IPI_DST_NOTME, IPI_HALT);
+	cpu_halt_others();
 	delay(100000);	/* XXX */
 #endif