diff options
author | Stephane Eranian <eranian@google.com> | 2014-03-11 19:53:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-03-12 05:49:13 -0400 |
commit | 4191c29f0593e82d19c3cd05de67e55467aca6b5 (patch) | |
tree | 4a181853f88a375f0c2089938cae82bbdbc1f3e2 /arch/x86/kernel/cpu | |
parent | 6bedfab68666afac1b03f8d62ee037c6ab82fbc5 (diff) |
perf/x86/uncore: Fix compilation warning in snb_uncore_imc_init_box()
This patch fixes a compilation problem (unused variable) with the
new SNB/IVB/HSW uncore IMC code.
[ In -v2 we simplify the fix as suggested by Peter Zjilstra. ]
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140311235329.GA28624@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 11 |
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 = { | |||
1722 | static void snb_uncore_imc_init_box(struct intel_uncore_box *box) | 1722 | static 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); |