Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2011 18:14:43 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220638 - head/sys/powerpc/powerpc
Message-ID:  <201104141814.p3EIEh6O043229@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104141814.p3EIEh6O043229>