Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144456621
D29600.1774698239.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
814 B
Referenced Files
None
Subscribers
None
D29600.1774698239.diff
View Options
diff --git a/sys/dev/hwpmc/hwpmc_arm64.h b/sys/dev/hwpmc/hwpmc_arm64.h
--- a/sys/dev/hwpmc/hwpmc_arm64.h
+++ b/sys/dev/hwpmc/hwpmc_arm64.h
@@ -40,7 +40,6 @@
#define ARMV8_RELOAD_COUNT_TO_PERFCTR_VALUE(R) (-(R))
#define ARMV8_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P))
-#define EVENT_ID_MASK 0xFF
#ifdef _KERNEL
/* MD extension for 'struct pmc' */
diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -181,7 +181,9 @@
}
pe = a->pm_ev;
- config = (pe & EVENT_ID_MASK);
+ config = (uint32_t)pe - PMC_EV_ARMV8_FIRST;
+ if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST))
+ return (EINVAL);
pm->pm_md.pm_arm64.pm_arm64_evsel = config;
PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 28, 11:43 AM (10 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28218200
Default Alt Text
D29600.1774698239.diff (814 B)
Attached To
Mode
D29600: arm64: Fix finding the pmc event ID
Attached
Detach File
Event Timeline
Log In to Comment