[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1423262636-12053-3-git-send-email-tom.huynh@freescale.com>
Date: Fri, 6 Feb 2015 16:43:55 -0600
From: Tom Huynh <tom.huynh@...escale.com>
To: <benh@...nel.crashing.org>, <paulus@...ba.org>,
<mpe@...erman.id.au>, <a.p.zijlstra@...llo.nl>, <mingo@...hat.com>,
<acme@...nel.org>
CC: <Kim.Phillips@...escale.com>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-kernel@...r.kernel.org>,
Tom Huynh <tom.huynh@...escale.com>,
"Kim Phillips" <kim.phillips@...escale.com>
Subject: [PATCH 2/3] perf/e6500: Create a sysfs format entry for e6500 events
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@...escale.com>
Signed-off-by: Tom Huynh <tom.huynh@...escale.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists