lkml.org 
[lkml]   [2015]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] perf/e6500: Create a sysfs format entry for e6500 events
Date
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@freescale.com>
Signed-off-by: Tom Huynh <tom.huynh@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


\
 
 \ /
  Last update: 2015-02-07 00:01    [W:0.121 / U:2.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site