Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
From: Andi Kleen
Date: Sat Aug 05 2006 - 22:36:08 EST
On Sat, Aug 05, 2006 at 07:47:41PM +1000, Rusty Russell wrote:
> [Andi, sorry, x86_64 part untested, so sending straight to you]
> rdmsr and rdtsc are macros, altering their arguments directly. An
> inline function would offer decent typechecking, but needs to take
> pointer args. The comment notes that gcc produces better code with
I think I prefer the macro variant actually. Sorry. It just looks
better without the &s.
We don't care very much about the code quality here because
rdmsr/wrmsr are always very slow in microcode anyways and tend
to synchronize the CPUs.
If you feel a need to clean up I would suggest you convert more
users over to the ll variants which take a single 64bit value
instead of two 32bit ones.
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/