linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] Support for perf on AMD family17h processors
@ 2016-11-17 16:15 Janakarajan Natarajan
  2016-11-17 18:44 ` Borislav Petkov
  2016-11-18  9:06 ` [tip:perf/urgent] perf/x86: Add perf support for AMD family-17h processors tip-bot for Janakarajan Natarajan
  0 siblings, 2 replies; 3+ messages in thread
From: Janakarajan Natarajan @ 2016-11-17 16:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Suravee Suthikulpanit, Janakarajan Natarajan

This patch enables perf core PMU support for AMD family17h processors. In
family17h, there is no PMC-event constraint. All events, irrespective of
the type, can be measured using any of the performance counters.

Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
---

v1->v2

* Removed renaming of amd_core_pmu_init and associated comment.
* Changed comment style to follow guidelines.

 arch/x86/events/amd/core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
index f5f4b3f..afb222b 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)
 		pr_cont("Fam15h ");
 		x86_pmu.get_event_constraints = amd_get_event_constraints_f15h;
 		break;
-
+	case 0x17:
+		pr_cont("Fam17h ");
+		/*
+		 * In family 17h, there are no event constraints in the PMC hardware.
+		 * We fallback to using default amd_get_event_constraints.
+		 */
+		break;
 	default:
 		pr_err("core perfctr but no constraints; unknown hardware!\n");
 		return -ENODEV;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-18  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 16:15 [PATCHv2] Support for perf on AMD family17h processors Janakarajan Natarajan
2016-11-17 18:44 ` Borislav Petkov
2016-11-18  9:06 ` [tip:perf/urgent] perf/x86: Add perf support for AMD family-17h processors tip-bot for Janakarajan Natarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).