[PATCH 2/3] perf/e6500: Create a sysfs format entry for e6500 events
From: Tom Huynh
Date: Fri Feb 06 2015 - 17:45:23 EST
Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event'
which describes the format of the e6500 PMU events. e6500 has <= 512
events, so use the 9 lsb to specify the raw event code.
$ cat /sys/devices/cpu/format/event
config:0-8
Similar to commit 3bf7b07ece6e ("perf/POWER7: Create a sysfs format
entry for Power7 events").
Signed-off-by: Kim Phillips <kim.phillips@xxxxxxxxxxxxx>
Signed-off-by: Tom Huynh <tom.huynh@xxxxxxxxxxxxx>
---
arch/powerpc/perf/e6500-pmu.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/powerpc/perf/e6500-pmu.c b/arch/powerpc/perf/e6500-pmu.c
index abaa6d7..4bbdbb0 100644
--- a/arch/powerpc/perf/e6500-pmu.c
+++ b/arch/powerpc/perf/e6500-pmu.c
@@ -133,7 +133,20 @@ static struct attribute_group e6500_pmu_events_group = {
.attrs = e6500_events_attr,
};
+PMU_FORMAT_ATTR(event, "config:0-8");
+
+static struct attribute *e6500_pmu_format_attr[] = {
+ &format_attr_event.attr,
+ NULL,
+};
+
+struct attribute_group e6500_pmu_format_group = {
+ .name = "format",
+ .attrs = e6500_pmu_format_attr,
+};
+
static const struct attribute_group *e6500_pmu_attr_groups[] = {
+ &e6500_pmu_format_group,
&e6500_pmu_events_group,
NULL,
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/