Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2010 16:40:14 +0000 (UTC)
From:      Fabien Thomas <fabient@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: r202015 - stable/7/sys/dev/hwpmc
Message-ID:  <201001101640.o0AGeE0r081092@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Sun Jan 10 16:40:14 2010
New Revision: 202015
URL: http://svn.freebsd.org/changeset/base/202015

Log:
  MFC 201023:
   * Support the L1D_CACHE_LD event on Core2 processors.
   * Correct a group of typos: for Core2 programmable events, check
     user supplied umask values against the correct event descriptor
     field.

Modified:
  stable/7/sys/dev/hwpmc/hwpmc_core.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/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/7/sys/dev/hwpmc/hwpmc_core.c	Sun Jan 10 16:36:43 2010	(r202014)
+++ stable/7/sys/dev/hwpmc/hwpmc_core.c	Sun Jan 10 16:40:14 2010	(r202015)
@@ -669,7 +669,7 @@ static struct iap_event_descr iap_events
     IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS),
     IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS),
 
-    IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC),
+    IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2),
     IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA),
 
     IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2),
@@ -1419,17 +1419,17 @@ iap_allocate_pmc(int cpu, int ri, struct
 
 		mask = 0;
 
-		if (ie->iap_flags & IAP_M_CORE) {
+		if (ie->iap_umask & IAP_M_CORE) {
 			if ((c = (config & IAP_F_CORE)) != IAP_CORE_ALL &&
 			    c != IAP_CORE_THIS)
 				return (EINVAL);
 			mask |= IAP_F_CORE;
 		}
 
-		if (ie->iap_flags & IAP_M_AGENT)
+		if (ie->iap_umask & IAP_M_AGENT)
 			mask |= IAP_F_AGENT;
 
-		if (ie->iap_flags & IAP_M_PREFETCH) {
+		if (ie->iap_umask & IAP_M_PREFETCH) {
 
 			if ((c = (config & IAP_F_PREFETCH)) ==
 			    IAP_PREFETCH_RESERVED)
@@ -1438,16 +1438,16 @@ iap_allocate_pmc(int cpu, int ri, struct
 			mask |= IAP_F_PREFETCH;
 		}
 
-		if (ie->iap_flags & IAP_M_MESI)
+		if (ie->iap_umask & IAP_M_MESI)
 			mask |= IAP_F_MESI;
 
-		if (ie->iap_flags & IAP_M_SNOOPRESPONSE)
+		if (ie->iap_umask & IAP_M_SNOOPRESPONSE)
 			mask |= IAP_F_SNOOPRESPONSE;
 
-		if (ie->iap_flags & IAP_M_SNOOPTYPE)
+		if (ie->iap_umask & IAP_M_SNOOPTYPE)
 			mask |= IAP_F_SNOOPTYPE;
 
-		if (ie->iap_flags & IAP_M_TRANSITION)
+		if (ie->iap_umask & IAP_M_TRANSITION)
 			mask |= IAP_F_TRANSITION;
 
 		/*



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