Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1286049
| From | Harish Chegondi <harish.chegondi@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset |
| Date | 2015-12-07 23:40 +0100 |
| Message-ID | <qDcBQ-2jb-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset Harish Chegondi <harish.chegondi@intel.com> - 2015-12-07 23:40 +0100
[PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Harish Chegondi <harish.chegondi@intel.com> - 2015-12-07 23:40 +0100
Re: [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Peter Zijlstra <peterz@infradead.org> - 2015-12-08 10:10 +0100
Re: [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Harish Chegondi <harish.chegondi@intel.com> - 2015-12-09 22:10 +0100
Re: [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Peter Zijlstra <peterz@infradead.org> - 2015-12-10 00:40 +0100
Re: [PATCH 2/2] perf/x86/intel/uncore: Add Knights Landing uncore PMU support Harish Chegondi <harish.chegondi@intel.com> - 2015-12-10 00:50 +0100
csiph-web