From: tip-bot for Stephane Eranian <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@kernel.org, peterz@infradead.org, sfr@canb.auug.org.au,
tglx@linutronix.de
Subject: [tip:perf/core] perf/x86/uncore: Fix compilation warning in snb_uncore_imc_init_box()
Date: Wed, 12 Mar 2014 03:10:55 -0700 [thread overview]
Message-ID: <tip-4191c29f0593e82d19c3cd05de67e55467aca6b5@git.kernel.org> (raw)
In-Reply-To: <20140311235329.GA28624@quad>
Commit-ID: 4191c29f0593e82d19c3cd05de67e55467aca6b5
Gitweb: http://git.kernel.org/tip/4191c29f0593e82d19c3cd05de67e55467aca6b5
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Wed, 12 Mar 2014 00:53:30 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 12 Mar 2014 10:49:13 +0100
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>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 11 ++++++-----
1 file 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 5c2537a..dfd50ea 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 = {
static void snb_uncore_imc_init_box(struct intel_uncore_box *box)
{
struct pci_dev *pdev = box->pci_dev;
- u32 addr_lo, addr_hi;
+ int where = SNB_UNCORE_PCI_IMC_BAR_OFFSET;
resource_size_t addr;
+ u32 pci_dword;
- pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_lo);
- addr = addr_lo;
+ pci_read_config_dword(pdev, where, &pci_dword);
+ addr = pci_dword;
#ifdef CONFIG_PHYS_ADDR_T_64BIT
- pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi);
- addr = ((resource_size_t)addr_hi << 32) | addr_lo;
+ pci_read_config_dword(pdev, where + 4, &pci_dword);
+ addr |= ((resource_size_t)pci_dword << 32);
#endif
addr &= ~(PAGE_SIZE - 1);
next prev parent reply other threads:[~2014-03-12 10:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 23:53 [PATCH v2] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box() Stephane Eranian
2014-03-12 7:05 ` Peter Zijlstra
2014-03-12 9:23 ` Stephane Eranian
2014-03-12 10:10 ` tip-bot for Stephane Eranian [this message]
2014-04-15 20:35 ` Kirill A. Shutemov
2014-04-16 15:10 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-4191c29f0593e82d19c3cd05de67e55467aca6b5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox