LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Cal Peake <cp@absolutedigital.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] drop unneeded variable in amd_apic_timer_broken
Date: Tue, 7 Aug 2007 20:53:21 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0708072030440.28681@lancer.cnet.absolutedigital.net> (raw)
In-Reply-To: <20070808000631.GB7353@one.firstfloor.org>
On Wed, 8 Aug 2007, Andi Kleen wrote:
> Not sure why the MSR varies between cores though.
Yeah that boggled me too.
> It's better to just make it a global instead.
Haven't gotten to figuring out how to do *that* yet... but here's a
cleanup for the detection function:
From: Cal Peake <cp@absolutedigital.net>
We only care about the lower 32-bits when reading the Interrupt Pending
Message Register so drop the 'hi' variable and use rdmsrl() instead.
Signed-off-by: Cal Peake <cp@absolutedigital.net>
--- ./arch/i386/kernel/cpu/amd.c~orig 2007-08-07 20:22:26.000000000 -0400
+++ ./arch/i386/kernel/cpu/amd.c 2007-08-07 20:23:22.000000000 -0400
@@ -34,7 +34,7 @@ __asm__(".align 4\nvide: ret");
/* AMD systems with C1E don't have a working lAPIC timer. Check for that. */
static __cpuinit int amd_apic_timer_broken(void)
{
- u32 lo, hi;
+ u32 msr;
u32 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
switch (eax & CPUID_XFAM) {
case CPUID_XFAM_K8:
@@ -42,8 +42,8 @@ static __cpuinit int amd_apic_timer_brok
break;
case CPUID_XFAM_10H:
case CPUID_XFAM_11H:
- rdmsr(MSR_K8_ENABLE_C1E, lo, hi);
- if (lo & ENABLE_C1E_MASK)
+ rdmsrl(MSR_K8_ENABLE_C1E, msr);
+ if (msr & ENABLE_C1E_MASK)
return 1;
break;
default:
next prev parent reply other threads:[~2007-08-08 0:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 18:05 ACPI on Averatec 2370 Frank Hale
2007-07-29 18:13 ` Gabriel C
2007-07-29 18:45 ` Cal Peake
2007-07-29 18:58 ` Frank Hale
2007-07-29 19:58 ` Frank Hale
2007-07-30 15:20 ` Cal Peake
2007-08-02 17:50 ` Cal Peake
2007-08-02 19:09 ` Chuck Ebbert
2007-08-02 19:42 ` Cal Peake
2007-08-02 20:26 ` Chuck Ebbert
2007-08-02 20:30 ` Cal Peake
2007-08-02 20:51 ` Frank Hale
2007-08-02 21:07 ` Linus Torvalds
2007-08-02 21:53 ` Cal Peake
2007-08-03 21:56 ` Linus Torvalds
2007-08-04 9:30 ` Andi Kleen
2007-08-04 13:50 ` Frank Hale
2007-08-05 14:26 ` Thomas Renninger
2007-08-07 22:15 ` Cal Peake
2007-08-08 0:06 ` Andi Kleen
2007-08-08 0:53 ` Cal Peake [this message]
2007-08-08 14:36 ` [PATCH] drop unneeded variable in amd_apic_timer_broken Andi Kleen
2007-08-08 16:00 ` Cal Peake
2007-08-08 18:25 ` Tim Gardner
2007-08-08 14:41 ` ACPI on Averatec 2370 Joachim Deguara
2007-08-08 23:52 ` Frank Hale
2007-08-09 9:45 ` Joachim Deguara
2007-08-03 15:52 ` Ben Collins
2007-08-03 18:19 ` Chuck Ebbert
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=Pine.LNX.4.64.0708072030440.28681@lancer.cnet.absolutedigital.net \
--to=cp@absolutedigital.net \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] drop unneeded variable in amd_apic_timer_broken' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).