[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0803211756000.3781@apollo.tec.linutronix.de>
Date: Fri, 21 Mar 2008 18:06:13 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Andi Kleen <andi@...stfloor.org>
cc: andreas.herrmann3@....com, mingo@...e.hu,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [5/7] Readd rdmsrl_safe
On Wed, 12 Mar 2008, Andi Kleen wrote:
> RDMSR for 64bit values with exception handling.
>
> Makes it easier to deal with 64bit valued MSRs. The old 64bit code
> base had that too as checking_rdmsrl(), but it got dropped somehow.
Yup, no users.
> +#define rdmsrl_safe(msr,p) \
> + ({ int __err; *(p) = native_read_msr_safe(msr, &__err); __err; })
> +
static inline please
> #define rdtscl(low) \
> ((low) = (u32)native_read_tsc())
>
> Index: linux/include/asm-x86/paravirt.h
> ===================================================================
> --- linux.orig/include/asm-x86/paravirt.h
> +++ linux/include/asm-x86/paravirt.h
> @@ -687,6 +687,10 @@ static inline int paravirt_write_msr(uns
> (*b) = _l >> 32; \
> _err; })
>
> +#define rdmsrl_safe(msr, p) ({ \
> + int _err; \
> + *(p) = paravirt_read_msr(msr, &_err); \
> + _err; })
ditto
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists