From owner-svn-src-all@FreeBSD.ORG Thu Aug 12 13:46:43 2010 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 8651B106564A; Thu, 12 Aug 2010 13:46:43 +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 5AEB68FC17; Thu, 12 Aug 2010 13:46: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 o7CDkhAQ096096; Thu, 12 Aug 2010 13:46:43 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7CDkhmg096093; Thu, 12 Aug 2010 13:46:43 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008121346.o7CDkhmg096093@svn.freebsd.org> From: Attilio Rao Date: Thu, 12 Aug 2010 13:46: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: r211220 - in head/sys: amd64/amd64 i386/i386 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, 12 Aug 2010 13:46:43 -0000 Author: attilio Date: Thu Aug 12 13:46:43 2010 New Revision: 211220 URL: http://svn.freebsd.org/changeset/base/211220 Log: Revert r211176: As long as interrupts are disabled and there is not explicit call to sched_add() there can't be any preemption there, thus the calls may be consistent. Reported by: kib, jhb Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 12 11:01:38 2010 (r211219) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 12 13:46:43 2010 (r211220) @@ -1324,10 +1324,8 @@ cpustop_handler(void) cpumask_t cpumask; u_int cpu; - sched_pin(); cpu = PCPU_GET(cpuid); cpumask = PCPU_GET(cpumask); - sched_unpin(); savectx(&stoppcbs[cpu]); @@ -1358,10 +1356,8 @@ cpususpend_handler(void) register_t cr3, rf; u_int cpu; - sched_pin(); cpu = PCPU_GET(cpuid); cpumask = PCPU_GET(cpumask); - sched_unpin(); rf = intr_disable(); cr3 = rcr3(); @@ -1542,14 +1538,10 @@ mp_grab_cpu_hlt(void) #endif int retval; -#ifdef MP_WATCHDOG - sched_pin(); mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG cpuid = PCPU_GET(cpuid); - sched_unpin(); ap_watchdog(cpuid); -#else - mask = PCPU_GET(cpumask); #endif retval = 0; Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Thu Aug 12 11:01:38 2010 (r211219) +++ head/sys/i386/i386/mp_machdep.c Thu Aug 12 13:46:43 2010 (r211220) @@ -1411,10 +1411,8 @@ cpustop_handler(void) cpumask_t cpumask; u_int cpu; - sched_pin(); cpu = PCPU_GET(cpuid); cpumask = PCPU_GET(cpumask); - sched_unpin(); savectx(&stoppcbs[cpu]); @@ -1588,14 +1586,10 @@ mp_grab_cpu_hlt(void) #endif int retval; -#ifdef MP_WATCHDOG - sched_pin(); mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG cpuid = PCPU_GET(cpuid); - sched_unpin(); ap_watchdog(cpuid); -#else - mask = PCPU_GET(cpumask); #endif retval = 0;