svn commit: r220638 - head/sys/powerpc/powerpc
Andreas Tobler
andreast at FreeBSD.org
Thu Apr 14 18:14:44 UTC 2011
Author: andreast
Date: Thu Apr 14 18:14:43 2011
New Revision: 220638
URL: http://svn.freebsd.org/changeset/base/220638
Log:
Add stoppcbs[] arrays on powerpc(64) and have each CPU save its
current context in the IPI_STOP handler. Similar as done on other
architectures.
Approved by: nwhitehorn (mentor)
Modified:
head/sys/powerpc/powerpc/mp_machdep.c
Modified: head/sys/powerpc/powerpc/mp_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/mp_machdep.c Thu Apr 14 17:50:26 2011 (r220637)
+++ head/sys/powerpc/powerpc/mp_machdep.c Thu Apr 14 18:14:43 2011 (r220638)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/cpu.h>
#include <machine/intr_machdep.h>
+#include <machine/pcb.h>
#include <machine/platform.h>
#include <machine/md_var.h>
#include <machine/smp.h>
@@ -62,6 +63,7 @@ volatile static u_int ap_letgo;
volatile static u_quad_t ap_timebase;
static u_int ipi_msg_cnt[32];
static struct mtx ap_boot_mtx;
+struct pcb stoppcbs[MAXCPU];
void
machdep_ap_bootstrap(void)
@@ -306,6 +308,7 @@ powerpc_ipi_handler(void *arg)
*/
CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)",
__func__);
+ savectx(&stoppcbs[PCPU_GET(cpuid)]);
self = PCPU_GET(cpumask);
savectx(PCPU_GET(curpcb));
atomic_set_int(&stopped_cpus, self);
More information about the svn-src-head
mailing list