From owner-svn-src-all@FreeBSD.ORG Wed Nov 23 16:02:36 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 F1F5A106566C; Wed, 23 Nov 2011 16:02:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E13C28FC17; Wed, 23 Nov 2011 16:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pANG2aTq052756; Wed, 23 Nov 2011 16:02:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANG2aXl052754; Wed, 23 Nov 2011 16:02:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201111231602.pANG2aXl052754@svn.freebsd.org> From: Attilio Rao Date: Wed, 23 Nov 2011 16:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227891 - stable/8/sys/kern 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: Wed, 23 Nov 2011 16:02:37 -0000 Author: attilio Date: Wed Nov 23 16:02:36 2011 New Revision: 227891 URL: http://svn.freebsd.org/changeset/base/227891 Log: MFC r227058: Disable interrupt and preemption for smp_rendezvous() also in the UP/!SMP case. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/subr_smp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Wed Nov 23 16:02:12 2011 (r227890) +++ stable/8/sys/kern/subr_smp.c Wed Nov 23 16:02:36 2011 (r227891) @@ -409,13 +409,16 @@ smp_rendezvous_cpus(cpumask_t map, { int i, ncpus = 0; + /* Look comments in the !SMP case. */ if (!smp_started) { + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); return; } @@ -652,12 +655,18 @@ smp_rendezvous_cpus(cpumask_t map, void (*teardown_func)(void *), void *arg) { + /* + * In the !SMP case we just need to ensure the same initial conditions + * as the SMP case. + */ + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); } void @@ -667,12 +676,15 @@ smp_rendezvous(void (*setup_func)(void * void *arg) { + /* Look comments in the smp_rendezvous_cpus() case. */ + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); } /*