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.phill...@freescale.com> Signed-off-by: Tom Huynh <tom.hu...@freescale.com> --- 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 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev