Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2011 02:09:09 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222436 - stable/8/sys/dev/hwpmc
Message-ID:  <201105290209.p4T299nS009966@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Sun May 29 02:09:09 2011
New Revision: 222436
URL: http://svn.freebsd.org/changeset/base/222436

Log:
  MFC r222002:
  Do not use memory barrier when is not necessary.

Modified:
  stable/8/sys/dev/hwpmc/hwpmc_mod.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/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_mod.c	Sun May 29 00:59:38 2011	(r222435)
+++ stable/8/sys/dev/hwpmc/hwpmc_mod.c	Sun May 29 02:09:09 2011	(r222436)
@@ -4083,7 +4083,7 @@ pmc_process_interrupt(int cpu, struct pm
 
  done:
 	/* mark CPU as needing processing */
-	atomic_set_rel_int(&pmc_cpumask, (1 << cpu));
+	atomic_set_int(&pmc_cpumask, (1 << cpu));
 
 	return (error);
 }
@@ -4193,7 +4193,7 @@ pmc_process_samples(int cpu)
 			break;
 		if (ps->ps_nsamples == PMC_SAMPLE_INUSE) {
 			/* Need a rescan at a later time. */
-			atomic_set_rel_int(&pmc_cpumask, (1 << cpu));
+			atomic_set_int(&pmc_cpumask, (1 << cpu));
 			break;
 		}
 
@@ -4782,7 +4782,7 @@ pmc_cleanup(void)
 	PMCDBG(MOD,INI,0, "%s", "cleanup");
 
 	/* switch off sampling */
-	atomic_store_rel_int(&pmc_cpumask, 0);
+	pmc_cpumask = 0;
 	pmc_intr = NULL;
 
 	sx_xlock(&pmc_sx);



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