Commit 71e0cb32 authored by Robin Murphy's avatar Robin Murphy Committed by Will Deacon

perf/arm_cspmu: Fix event attribute type

ARM_CSPMU_EVENT_ATTR() defines a struct perf_pmu_events_attr, so
arm_cspmu_sysfs_event_show() should not be interpreting it as struct
dev_ext_attribute.

Fixes: e37dfd65 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-and-tested-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/27c0804af64007b2400abbc40278f642ee6a0a29.1685983270.git.robin.murphy@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 225d7570
...@@ -189,10 +189,10 @@ static inline bool use_64b_counter_reg(const struct arm_cspmu *cspmu) ...@@ -189,10 +189,10 @@ static inline bool use_64b_counter_reg(const struct arm_cspmu *cspmu)
ssize_t arm_cspmu_sysfs_event_show(struct device *dev, ssize_t arm_cspmu_sysfs_event_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct dev_ext_attribute *eattr = struct perf_pmu_events_attr *pmu_attr;
container_of(attr, struct dev_ext_attribute, attr);
return sysfs_emit(buf, "event=0x%llx\n", pmu_attr = container_of(attr, typeof(*pmu_attr), attr);
(unsigned long long)eattr->var); return sysfs_emit(buf, "event=0x%llx\n", pmu_attr->id);
} }
EXPORT_SYMBOL_GPL(arm_cspmu_sysfs_event_show); EXPORT_SYMBOL_GPL(arm_cspmu_sysfs_event_show);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment