Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2011 16:02:38 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r219498 - in stable/7/sys/cddl/dev/dtrace: amd64 i386
Message-ID:  <201103111602.p2BG2cEh085191@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Mar 11 16:02:38 2011
New Revision: 219498
URL: http://svn.freebsd.org/changeset/base/219498

Log:
  MFC r216251: dtrace_xcall: no need for special handling of curcpu

Modified:
  stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==============================================================================
--- stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 16:00:56 2011	(r219497)
+++ stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 16:02:38 2011	(r219498)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
 	cpumask_t cpus;
 
-	critical_enter();
-
 	if (cpu == DTRACE_CPUALL)
 		cpus = all_cpus;
 	else
-		cpus = (cpumask_t) (1 << cpu);
-
-	/* If the current CPU is in the set, call the function directly: */
-	if ((cpus & (1 << curcpu)) != 0) {
-		(*func)(arg);
-
-		/* Mask the current CPU from the set */
-		cpus &= ~(1 << curcpu);
-	}
-
-	/* If there are any CPUs in the set, cross-call to those CPUs */
-	if (cpus != 0)
-		smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg);
+		cpus = (cpumask_t)1 << cpu;
 
-	critical_exit();
+	smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+	    smp_no_rendevous_barrier, arg);
 }
 
 static void

Modified: stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==============================================================================
--- stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 16:00:56 2011	(r219497)
+++ stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 16:02:38 2011	(r219498)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
 	cpumask_t cpus;
 
-	critical_enter();
-
 	if (cpu == DTRACE_CPUALL)
 		cpus = all_cpus;
 	else
-		cpus = (cpumask_t) (1 << cpu);
-
-	/* If the current CPU is in the set, call the function directly: */
-	if ((cpus & (1 << curcpu)) != 0) {
-		(*func)(arg);
-
-		/* Mask the current CPU from the set */
-		cpus &= ~(1 << curcpu);
-	}
-
-	/* If there are any CPUs in the set, cross-call to those CPUs */
-	if (cpus != 0)
-		smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg);
+		cpus = (cpumask_t)1 << cpu;
 
-	critical_exit();
+	smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+	    smp_no_rendevous_barrier, arg);
 }
 
 static void



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