aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>2016-11-17 11:15:06 -0500
committerIngo Molnar <mingo@kernel.org>2016-11-18 03:45:57 -0500
commite40ed1542dd779e5037a22c6b534e57127472365 (patch)
treee2933f5c186a821692fe8f2943e2559afe79f636
parentc499336cea8bbe15554c6fcea2138658c5395bfe (diff)
perf/x86: Add perf support for AMD family-17h processors
This patch enables perf core PMU support for the new AMD family-17h processors. In family-17h, there is no PMC-event constraint. All events, irrespective of the type, can be measured using any of the six generic performance counters. Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Link: http://lkml.kernel.org/r/1479399306-13375-1-git-send-email-Janakarajan.Natarajan@amd.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/events/amd/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
index f5f4b3fbbbc2..afb222b63cae 100644
--- a/arch/x86/events/amd/core.c
+++ b/arch/x86/events/amd/core.c
@@ -662,7 +662,13 @@ static int __init amd_core_pmu_init(void)
662 pr_cont("Fam15h "); 662 pr_cont("Fam15h ");
663 x86_pmu.get_event_constraints = amd_get_event_constraints_f15h; 663 x86_pmu.get_event_constraints = amd_get_event_constraints_f15h;
664 break; 664 break;
665 665 case 0x17:
666 pr_cont("Fam17h ");
667 /*
668 * In family 17h, there are no event constraints in the PMC hardware.
669 * We fallback to using default amd_get_event_constraints.
670 */
671 break;
666 default: 672 default:
667 pr_err("core perfctr but no constraints; unknown hardware!\n"); 673 pr_err("core perfctr but no constraints; unknown hardware!\n");
668 return -ENODEV; 674 return -ENODEV;