aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-06-04 04:49:06 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-06-04 04:49:06 +0000
commit9645bcabdf76e6e8bbe7052de3b3a821155c6132 (patch)
tree84020cb523cf65d54664810127eb34fcc3671bd1 /sys/dev
parenta9a99372d959895d98db720a3fbbdc8e3420c87f (diff)
downloadsrc-9645bcabdf76e6e8bbe7052de3b3a821155c6132.tar.gz
src-9645bcabdf76e6e8bbe7052de3b3a821155c6132.zip
hwpmc: fix fixed counters checks
Notes
Notes: svn path=/head/; revision=334598
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/hwpmc/hwpmc_core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c
index 7f5aab42595b..b308f51ef181 100644
--- a/sys/dev/hwpmc/hwpmc_core.c
+++ b/sys/dev/hwpmc/hwpmc_core.c
@@ -251,14 +251,13 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm,
if (ev == 0xC0 && ri != 0)
return (EINVAL);
/* CPU_CLK_UNHALTED.THREAD */
- else if (ev == 0x3C && ri != 1)
+ if (ev == 0x3C && ri != 1)
return (EINVAL);
/* CPU_CLK_UNHALTED.REF */
- else if (ev == 0x0 && umask == 0x3 && ri != 2)
- return (EINVAL);
- else
+ if (ev == 0x0 && umask == 0x3 && ri != 2)
return (EINVAL);
+
flags = 0;
if (config & IAP_OS)
flags |= IAF_OS;