Re: kernel/microcode.c error from new 64bit code
From: H. Peter Anvin
Date: Sun Feb 22 2004 - 15:36:44 EST
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/