aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 0a18d16cb58d..453ac9497574 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1314,6 +1314,11 @@ static void __init pmu_check_apic(void)
1314 pr_info("no hardware sampling interrupt available.\n"); 1314 pr_info("no hardware sampling interrupt available.\n");
1315} 1315}
1316 1316
1317static struct attribute_group x86_pmu_format_group = {
1318 .name = "format",
1319 .attrs = NULL,
1320};
1321
1317static int __init init_hw_perf_events(void) 1322static int __init init_hw_perf_events(void)
1318{ 1323{
1319 struct x86_pmu_quirk *quirk; 1324 struct x86_pmu_quirk *quirk;
@@ -1388,6 +1393,7 @@ static int __init init_hw_perf_events(void)
1388 } 1393 }
1389 1394
1390 x86_pmu.attr_rdpmc = 1; /* enable userspace RDPMC usage by default */ 1395 x86_pmu.attr_rdpmc = 1; /* enable userspace RDPMC usage by default */
1396 x86_pmu_format_group.attrs = x86_pmu.format_attrs;
1391 1397
1392 pr_info("... version: %d\n", x86_pmu.version); 1398 pr_info("... version: %d\n", x86_pmu.version);
1393 pr_info("... bit width: %d\n", x86_pmu.cntval_bits); 1399 pr_info("... bit width: %d\n", x86_pmu.cntval_bits);
@@ -1668,6 +1674,7 @@ static struct attribute_group x86_pmu_attr_group = {
1668 1674
1669static const struct attribute_group *x86_pmu_attr_groups[] = { 1675static const struct attribute_group *x86_pmu_attr_groups[] = {
1670 &x86_pmu_attr_group, 1676 &x86_pmu_attr_group,
1677 &x86_pmu_format_group,
1671 NULL, 1678 NULL,
1672}; 1679};
1673 1680