Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153824793
D29600.id86888.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
869 B
Referenced Files
None
Subscribers
None
D29600.id86888.diff
View Options
Index: sys/dev/hwpmc/hwpmc_arm64.h
===================================================================
--- sys/dev/hwpmc/hwpmc_arm64.h
+++ 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' */
Index: sys/dev/hwpmc/hwpmc_arm64.c
===================================================================
--- sys/dev/hwpmc/hwpmc_arm64.c
+++ 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, Apr 25, 1:20 AM (6 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32102540
Default Alt Text
D29600.id86888.diff (869 B)
Attached To
Mode
D29600: arm64: Fix finding the pmc event ID
Attached
Detach File
Event Timeline
Log In to Comment