diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_p6.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p6.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index c7181befecde..32bcfc7dd230 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c | |||
@@ -87,6 +87,23 @@ static void p6_pmu_enable_event(struct perf_event *event) | |||
87 | (void)checking_wrmsrl(hwc->config_base, val); | 87 | (void)checking_wrmsrl(hwc->config_base, val); |
88 | } | 88 | } |
89 | 89 | ||
90 | PMU_FORMAT_ATTR(event, "config:0-7" ); | ||
91 | PMU_FORMAT_ATTR(umask, "config:8-15" ); | ||
92 | PMU_FORMAT_ATTR(edge, "config:18" ); | ||
93 | PMU_FORMAT_ATTR(pc, "config:19" ); | ||
94 | PMU_FORMAT_ATTR(inv, "config:23" ); | ||
95 | PMU_FORMAT_ATTR(cmask, "config:24-31" ); | ||
96 | |||
97 | static struct attribute *intel_p6_formats_attr[] = { | ||
98 | &format_attr_event.attr, | ||
99 | &format_attr_umask.attr, | ||
100 | &format_attr_edge.attr, | ||
101 | &format_attr_pc.attr, | ||
102 | &format_attr_inv.attr, | ||
103 | &format_attr_cmask.attr, | ||
104 | NULL, | ||
105 | }; | ||
106 | |||
90 | static __initconst const struct x86_pmu p6_pmu = { | 107 | static __initconst const struct x86_pmu p6_pmu = { |
91 | .name = "p6", | 108 | .name = "p6", |
92 | .handle_irq = x86_pmu_handle_irq, | 109 | .handle_irq = x86_pmu_handle_irq, |
@@ -115,6 +132,8 @@ static __initconst const struct x86_pmu p6_pmu = { | |||
115 | .cntval_mask = (1ULL << 32) - 1, | 132 | .cntval_mask = (1ULL << 32) - 1, |
116 | .get_event_constraints = x86_get_event_constraints, | 133 | .get_event_constraints = x86_get_event_constraints, |
117 | .event_constraints = p6_event_constraints, | 134 | .event_constraints = p6_event_constraints, |
135 | |||
136 | .format_attrs = intel_p6_formats_attr, | ||
118 | }; | 137 | }; |
119 | 138 | ||
120 | __init int p6_pmu_init(void) | 139 | __init int p6_pmu_init(void) |