aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 5c2537af0a25..dfd50ea5ee0c 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1722,15 +1722,16 @@ static struct attribute_group snb_uncore_imc_format_group = {
1722static void snb_uncore_imc_init_box(struct intel_uncore_box *box) 1722static void snb_uncore_imc_init_box(struct intel_uncore_box *box)
1723{ 1723{
1724 struct pci_dev *pdev = box->pci_dev; 1724 struct pci_dev *pdev = box->pci_dev;
1725 u32 addr_lo, addr_hi; 1725 int where = SNB_UNCORE_PCI_IMC_BAR_OFFSET;
1726 resource_size_t addr; 1726 resource_size_t addr;
1727 u32 pci_dword;
1727 1728
1728 pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_lo); 1729 pci_read_config_dword(pdev, where, &pci_dword);
1729 addr = addr_lo; 1730 addr = pci_dword;
1730 1731
1731#ifdef CONFIG_PHYS_ADDR_T_64BIT 1732#ifdef CONFIG_PHYS_ADDR_T_64BIT
1732 pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi); 1733 pci_read_config_dword(pdev, where + 4, &pci_dword);
1733 addr = ((resource_size_t)addr_hi << 32) | addr_lo; 1734 addr |= ((resource_size_t)pci_dword << 32);
1734#endif 1735#endif
1735 1736
1736 addr &= ~(PAGE_SIZE - 1); 1737 addr &= ~(PAGE_SIZE - 1);