Author: avg
Date: Fri Mar 11 16:00:56 2011
New Revision: 219497
URL: http://svn.freebsd.org/changeset/base/219497

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

Modified:
  stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.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/cddl/dev/dtrace/amd64/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c    Fri Mar 11 15:53:11 
2011        (r219496)
+++ stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c    Fri Mar 11 16:00:56 
2011        (r219497)
@@ -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/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c     Fri Mar 11 15:53:11 
2011        (r219496)
+++ stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c     Fri Mar 11 16:00:56 
2011        (r219497)
@@ -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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to