From owner-svn-src-all@FreeBSD.ORG Thu Apr 14 18:14:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAEE41065676; Thu, 14 Apr 2011 18:14:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF568FC14; Thu, 14 Apr 2011 18:14:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3EIEhS0043231; Thu, 14 Apr 2011 18:14:43 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3EIEh6O043229; Thu, 14 Apr 2011 18:14:43 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201104141814.p3EIEh6O043229@svn.freebsd.org> From: Andreas Tobler Date: Thu, 14 Apr 2011 18:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220638 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2011 18:14:44 -0000 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 #include #include +#include #include #include #include @@ -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);