linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Kan Liang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, torvalds@linux-foundation.org,
	tglx@linutronix.de, mingo@kernel.org, kan.liang@intel.com,
	hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf/x86/intel/uncore: Expose uncore_pmu_event*() functions
Date: Thu, 31 May 2018 05:33:06 -0700	[thread overview]
Message-ID: <tip-5a6c9d94e9ed7410142bc6fcb638a4db1895aa0c@git.kernel.org> (raw)
In-Reply-To: <1525371913-10597-7-git-send-email-kan.liang@intel.com>

Commit-ID:  5a6c9d94e9ed7410142bc6fcb638a4db1895aa0c
Gitweb:     https://git.kernel.org/tip/5a6c9d94e9ed7410142bc6fcb638a4db1895aa0c
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Thu, 3 May 2018 11:25:12 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 31 May 2018 12:36:28 +0200

perf/x86/intel/uncore: Expose uncore_pmu_event*() functions

Some uncores have customized PMU. For customized PMU, it does not need
to customize everything. For example, it only needs to customize init()
function for client IMC uncore. Other functions like
add()/del()/start()/stop()/read() can use generic code.

Expose the uncore_pmu_event_add/del/start/stop() functions.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: acme@kernel.org
Cc: eranian@google.com
Link: http://lkml.kernel.org/r/1525371913-10597-7-git-send-email-kan.liang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/intel/uncore.c | 8 ++++----
 arch/x86/events/intel/uncore.h | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 0a6f6973690b..15b07379e72d 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -451,7 +451,7 @@ static int uncore_assign_events(struct intel_uncore_box *box, int assign[], int
 	return ret ? -EINVAL : 0;
 }
 
-static void uncore_pmu_event_start(struct perf_event *event, int flags)
+void uncore_pmu_event_start(struct perf_event *event, int flags)
 {
 	struct intel_uncore_box *box = uncore_event_to_box(event);
 	int idx = event->hw.idx;
@@ -491,7 +491,7 @@ static void uncore_pmu_event_start(struct perf_event *event, int flags)
 	}
 }
 
-static void uncore_pmu_event_stop(struct perf_event *event, int flags)
+void uncore_pmu_event_stop(struct perf_event *event, int flags)
 {
 	struct intel_uncore_box *box = uncore_event_to_box(event);
 	struct hw_perf_event *hwc = &event->hw;
@@ -528,7 +528,7 @@ static void uncore_pmu_event_stop(struct perf_event *event, int flags)
 	}
 }
 
-static int uncore_pmu_event_add(struct perf_event *event, int flags)
+int uncore_pmu_event_add(struct perf_event *event, int flags)
 {
 	struct intel_uncore_box *box = uncore_event_to_box(event);
 	struct hw_perf_event *hwc = &event->hw;
@@ -600,7 +600,7 @@ static int uncore_pmu_event_add(struct perf_event *event, int flags)
 	return 0;
 }
 
-static void uncore_pmu_event_del(struct perf_event *event, int flags)
+void uncore_pmu_event_del(struct perf_event *event, int flags)
 {
 	struct intel_uncore_box *box = uncore_event_to_box(event);
 	int i;
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h
index eb0265359019..c9e1e0bef3c3 100644
--- a/arch/x86/events/intel/uncore.h
+++ b/arch/x86/events/intel/uncore.h
@@ -467,6 +467,10 @@ struct intel_uncore_box *uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu
 u64 uncore_msr_read_counter(struct intel_uncore_box *box, struct perf_event *event);
 void uncore_pmu_start_hrtimer(struct intel_uncore_box *box);
 void uncore_pmu_cancel_hrtimer(struct intel_uncore_box *box);
+void uncore_pmu_event_start(struct perf_event *event, int flags);
+void uncore_pmu_event_stop(struct perf_event *event, int flags);
+int uncore_pmu_event_add(struct perf_event *event, int flags);
+void uncore_pmu_event_del(struct perf_event *event, int flags);
 void uncore_pmu_event_read(struct perf_event *event);
 void uncore_perf_event_update(struct intel_uncore_box *box, struct perf_event *event);
 struct event_constraint *

  reply	other threads:[~2018-05-31 12:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 18:25 [RESEND PATCH V7 1/8] perf/x86/intel/uncore: Customized event_read() for client IMC uncore kan.liang
2018-05-03 18:25 ` [RESEND PATCH V7 2/8] perf/x86/intel/uncore: Correct fixed counter index check for NHM kan.liang
2018-05-31 12:30   ` [tip:perf/core] " tip-bot for Kan Liang
2018-05-03 18:25 ` [RESEND PATCH V7 3/8] perf/x86/intel/uncore: Correct fixed counter index check in generic code kan.liang
2018-05-31 12:31   ` [tip:perf/core] " tip-bot for Kan Liang
2018-05-03 18:25 ` [RESEND PATCH V7 4/8] perf/x86/intel/uncore: Add new data structures for free running counters kan.liang
2018-05-31 12:31   ` [tip:perf/core] " tip-bot for Kan Liang
2018-05-03 18:25 ` [RESEND PATCH V7 5/8] perf/x86/intel/uncore: Add infrastructure for free running counter kan.liang
2018-05-31 12:32   ` [tip:perf/core] perf/x86/intel/uncore: Add infrastructure for free running counters tip-bot for Kan Liang
2018-05-03 18:25 ` [RESEND PATCH V7 6/8] perf/x86/intel/uncore: Support IIO free-running counters on SKX kan.liang
2018-05-31 12:32   ` [tip:perf/core] " tip-bot for Kan Liang
2018-05-03 18:25 ` [RESEND PATCH V7 7/8] perf/x86/intel/uncore: Expose uncore_pmu_event functions kan.liang
2018-05-31 12:33   ` tip-bot for Kan Liang [this message]
2018-05-03 18:25 ` [RESEND PATCH V7 8/8] perf/x86/intel/uncore: Clean up client IMC uncore kan.liang
2018-05-31 12:33   ` [tip:perf/core] " tip-bot for Kan Liang
2018-05-31 12:30 ` [tip:perf/core] perf/x86/intel/uncore: Introduce customized event_read() for " tip-bot for Kan Liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-5a6c9d94e9ed7410142bc6fcb638a4db1895aa0c@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).