From: Jaswinder Singh <jaswinder@infradead.org>
To: Robert Richter <robert.richter@amd.com>,
Ingo Molnar <mingo@elte.hu>,
Stephen Rothwell <sfr@canb.auug.org.au>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] apic, x86: Need to set offset before using it
Date: Mon, 25 Oct 2010 11:16:44 +0530 [thread overview]
Message-ID: <1287985605.2940.4.camel@netbook.satnam> (raw)
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
arch/x86/oprofile/op_model_amd.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index 42fb46f..c65a924 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -285,6 +285,7 @@ static inline int ibs_eilvt_valid(void)
int offset;
rdmsrl(MSR_AMD64_IBSCTL, val);
+ offset = val & IBSCTL_LVT_OFFSET_MASK;
if (!(val & IBSCTL_LVT_OFFSET_VALID)) {
pr_err(FW_BUG "cpu %d, invalid IBS "
"interrupt offset %d (MSR%08X=0x%016llx)",
@@ -293,8 +294,6 @@ static inline int ibs_eilvt_valid(void)
return 0;
}
- offset = val & IBSCTL_LVT_OFFSET_MASK;
-
if (eilvt_is_available(offset))
return !0;
--
1.7.2.3
next reply other threads:[~2010-10-25 5:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 5:46 Jaswinder Singh [this message]
2010-10-25 5:58 ` [PATCH v2] apic, x86: Need to set offset before using it Jaswinder Singh
2010-10-25 6:50 ` Ingo Molnar
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=1287985605.2940.4.camel@netbook.satnam \
--to=jaswinder@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
--cc=sfr@canb.auug.org.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.