diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2009-12-26 14:39:23 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2009-12-26 14:39:23 +0000 |
commit | 0d62d4a33373b58cf73b76900bdc007615662542 (patch) | |
tree | d2de02791d77c9754650b2af16b9fcedf7bc87b4 /sys/dev/hwpmc | |
parent | 5d9c8b273f251615bdd114673d51d70f0a92c8ba (diff) | |
download | FreeBSD-src-0d62d4a33373b58cf73b76900bdc007615662542.zip FreeBSD-src-0d62d4a33373b58cf73b76900bdc007615662542.tar.gz |
* 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.
Submitted by: Ryan Stone <rysto32 at gmail dot com>
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_core.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index b6de04d..43a4914 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -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 pmc *pm, 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 pmc *pm, 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; /* |