linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset
@ 2015-12-07 22:32 Harish Chegondi
  2015-12-07 22:32 ` [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Harish Chegondi
  2016-01-06 18:53 ` [tip:perf/core] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset tip-bot for Harish Chegondi
  0 siblings, 2 replies; 8+ messages in thread
From: Harish Chegondi @ 2015-12-07 22:32 UTC (permalink / raw)
  To: linux-kernel, mingo, a.p.zijlstra
  Cc: Harish Chegondi, Harish Chegondi, Andi Kleen, Kan Liang,
	Lukasz Anaczkowski

Call uncore_pci_box_ctl() function to get the PMON box control MSR offset
instead of hard coding the offset. This would allow us to use this
snbep_uncore_pci_init_box() function for other PCI PMON devices whose box
control MSR offset is different from SNBEP_PCI_PMON_BOX_CTL.

Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
index f0f4fcb..2672f51 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
@@ -315,8 +315,9 @@ static u64 snbep_uncore_pci_read_counter(struct intel_uncore_box *box, struct pe
 static void snbep_uncore_pci_init_box(struct intel_uncore_box *box)
 {
 	struct pci_dev *pdev = box->pci_dev;
+	int box_ctl = uncore_pci_box_ctl(box);
 
-	pci_write_config_dword(pdev, SNBEP_PCI_PMON_BOX_CTL, SNBEP_PMON_BOX_CTL_INT);
+	pci_write_config_dword(pdev, box_ctl, SNBEP_PMON_BOX_CTL_INT);
 }
 
 static void snbep_uncore_msr_disable_box(struct intel_uncore_box *box)
-- 
2.1.2.330.g565301e


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

end of thread, other threads:[~2016-01-06 18:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07 22:32 [PATCH 1/2] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset Harish Chegondi
2015-12-07 22:32 ` [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Harish Chegondi
2015-12-08  9:07   ` Peter Zijlstra
2015-12-09 21:03     ` Harish Chegondi
2015-12-09 23:37       ` Peter Zijlstra
2015-12-09 23:43         ` Harish Chegondi
2016-01-06 18:54   ` [tip:perf/core] " tip-bot for Harish Chegondi
2016-01-06 18:53 ` [tip:perf/core] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset tip-bot for Harish Chegondi

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).