All of lore.kernel.org
 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

* Re: [PATCHv2] Support for perf on AMD family17h processors
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2016-11-17 18:44 UTC (permalink / raw)
  To: Janakarajan Natarajan
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin,
	Suravee Suthikulpanit

On Thu, Nov 17, 2016 at 10:15:06AM -0600, Janakarajan Natarajan wrote:
> 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(-)

I already ran your previous one today and since this one doesn't bring
any changes which matter:

Acked-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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

* [tip:perf/urgent] perf/x86: Add perf support for AMD family-17h processors
  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-bot for Janakarajan Natarajan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Janakarajan Natarajan @ 2016-11-18  9:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, jolsa, torvalds, Janakarajan.Natarajan,
	alexander.shishkin, peterz, suravee.suthikulpanit, hpa, eranian,
	acme, linux-kernel, tglx, vincent.weaver, acme, bp

Commit-ID:  e40ed1542dd779e5037a22c6b534e57127472365
Gitweb:     http://git.kernel.org/tip/e40ed1542dd779e5037a22c6b534e57127472365
Author:     Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
AuthorDate: Thu, 17 Nov 2016 10:15:06 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 18 Nov 2016 09:45:57 +0100

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>
---
 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;

^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.