Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F116043009
D30602.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30602.diff
View Options
diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h
--- a/sys/arm64/include/pmc_mdep.h
+++ b/sys/arm64/include/pmc_mdep.h
@@ -38,7 +38,10 @@
#include <dev/hwpmc/hwpmc_arm64.h>
union pmc_md_op_pmcallocate {
- uint64_t __pad[4];
+ uint32_t pm_md_flags;
+#define PM_MD_RAW_EVENT 0x1
+ uint32_t __pad32;
+ uint64_t __pad[3];
};
/* Logging */
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,11 +181,14 @@
}
pe = a->pm_ev;
- config = (uint32_t)pe - PMC_EV_ARMV8_FIRST;
- if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST))
- return (EINVAL);
+ /* Adjust the config value if needed. */
+ config = (uint32_t)pe;
+ if ((a->pm_md.pm_md_flags & PM_MD_RAW_EVENT) == 0) {
+ config -= 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);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 3, 12:04 AM (13 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17915153
Default Alt Text
D30602.diff (1 KB)
Attached To
Mode
D30602: hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE
Attached
Detach File
Event Timeline
Log In to Comment