All of lore.kernel.org
 help / color / mirror / Atom feed
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:33:01 -0800	[thread overview]
Message-ID: <403911FD.6070505@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0402221230390.1395@ppc970.osdl.org>

Linus Torvalds wrote:
> 
> No. Because on x86-64 it is NOT zero. Because there "unsigned long" is
> 64-bit, and it results in the high 32 bits. Which is, again, exactly what
> we want.
> 

Ah yes, dual-mode code.  Should have figured.

> Guys, give it up. The code is not only already committed, it's simply the 
> best way to do what it does.

Perhaps an even better thing to have would be a wrmsr64() and rdmsr64() 
routines, for the MSRs which genuinely are a 64-bit item.  Splitting 
them up is rather ugly when it's a real 64-bit value.

Then the code would just be:

	/* 32 bits on x64, 64 bits on x86-64 */
	wrmsr64(MSR_NUMBER, (unsigned long)value);

I think the comment would be justified.

If you agree I'll send a patch.

	-hpa

  reply	other threads:[~2004-02-22 20:33 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 [this message]
2004-02-22 20:41           ` H. Peter Anvin
  -- 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=403911FD.6070505@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.