From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel/microcode.c error from new 64bit code
Date: Sun, 22 Feb 2004 12:41:20 -0800 [thread overview]
Message-ID: <403913F0.2040001@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0402221230390.1395@ppc970.osdl.org>
It turns out wrmsr64() and rdmsr64() is already in the code, except
they're called wrmsrl() and rdmsrl().
So I'd suggest the following:
Index: microcode.c
===================================================================
RCS file: /home/hpa/kernel/bkcvs/linux-2.5/arch/i386/kernel/microcode.c,v
retrieving revision 1.27
diff -u -r1.27 microcode.c
--- microcode.c 19 Feb 2004 04:48:45 -0000 1.27
+++ microcode.c 22 Feb 2004 20:40:30 -0000
@@ -371,9 +371,8 @@
spin_lock_irqsave(µcode_update_lock, flags);
/* write microcode via MSR 0x79 */
- wrmsr(MSR_IA32_UCODE_WRITE,
- (unsigned long) uci->mc->bits,
- (unsigned long) uci->mc->bits >> 16 >> 16);
+ /* Note: unsigned long is 32 bits on i386, 64 bits on x86-64 */
+ wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long) uci->mc->bits);
wrmsr(MSR_IA32_UCODE_REV, 0, 0);
__asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
next prev parent reply other threads:[~2004-02-22 20:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 22:52 kernel/microcode.c error from new 64bit code Stephen Hemminger
2004-02-18 23:08 ` Linus Torvalds
2004-02-18 23:21 ` Linus Torvalds
2004-02-21 14:16 ` Pavel Machek
2004-02-21 17:18 ` Linus Torvalds
2004-02-21 17:34 ` Pavel Machek
2004-02-21 17:44 ` Linus Torvalds
2004-02-21 18:36 ` Eric W. Biederman
2004-02-21 18:48 ` Pavel Machek
2004-02-21 19:03 ` Linus Torvalds
2004-02-21 19:30 ` Eric W. Biederman
2004-02-22 20:12 ` H. Peter Anvin
2004-02-22 20:32 ` Linus Torvalds
2004-02-22 20:33 ` H. Peter Anvin
2004-02-22 20:41 ` H. Peter Anvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-19 0:12 Nakajima, Jun
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=403913F0.2040001@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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.