Commit 3bf7b07e authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by Arnaldo Carvalho de Melo

perf/POWER7: Create a sysfs format entry for Power7 events

Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event'
which describes the format of the POWER7 PMU events.

This code is based on corresponding code in x86.

Changelog[v4]:  [Michael Ellerman, Paul Mckerras] The event format is different
		for other POWER cpus. So move the code to POWER7-specific,
		power7-pmu.c Also, the POWER7 format uses bits 0-19 not 0-20.

Changelog[v2]: [Jiri Osla] Use PMU_FORMAT_ATTR rather than duplicating code.
Signed-off-by: default avatarSukadev Bhattiprolu <>
Acked-by: default avatarPaul Mackerras <>
Tested-by: default avatarMichael Ellerman <>
Cc: Andi Kleen <>
Cc: Anton Blanchard <>
Cc: Ingo Molnar <>
Cc: Jiri Olsa <>
Cc: Michael Ellerman <>
Cc: Paul Mackerras <>
Cc: Peter Zijlstra <>
Cc: Robert Richter <>
Cc: Stephane Eranian <>
Link: default avatarArnaldo Carvalho de Melo <>
parent 79146a69
......@@ -420,7 +420,20 @@ static struct attribute_group power7_pmu_events_group = {
.attrs = power7_events_attr,
PMU_FORMAT_ATTR(event, "config:0-19");
static struct attribute *power7_pmu_format_attr[] = {
struct attribute_group power7_pmu_format_group = {
.name = "format",
.attrs = power7_pmu_format_attr,
static const struct attribute_group *power7_pmu_attr_groups[] = {
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