Commit 4191c29f authored by Stephane Eranian's avatar Stephane Eranian Committed by Ingo Molnar

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarStephane Eranian <eranian@google.com>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140311235329.GA28624@quadSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6bedfab6
...@@ -1722,15 +1722,16 @@ static struct attribute_group snb_uncore_imc_format_group = { ...@@ -1722,15 +1722,16 @@ static struct attribute_group snb_uncore_imc_format_group = {
static void snb_uncore_imc_init_box(struct intel_uncore_box *box) static void snb_uncore_imc_init_box(struct intel_uncore_box *box)
{ {
struct pci_dev *pdev = box->pci_dev; struct pci_dev *pdev = box->pci_dev;
u32 addr_lo, addr_hi; int where = SNB_UNCORE_PCI_IMC_BAR_OFFSET;
resource_size_t addr; resource_size_t addr;
u32 pci_dword;
pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_lo); pci_read_config_dword(pdev, where, &pci_dword);
addr = addr_lo; addr = pci_dword;
#ifdef CONFIG_PHYS_ADDR_T_64BIT #ifdef CONFIG_PHYS_ADDR_T_64BIT
pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi); pci_read_config_dword(pdev, where + 4, &pci_dword);
addr = ((resource_size_t)addr_hi << 32) | addr_lo; addr |= ((resource_size_t)pci_dword << 32);
#endif #endif
addr &= ~(PAGE_SIZE - 1); addr &= ~(PAGE_SIZE - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment