From b44755cfaa72e7ed3d831a946bb4e7dfe7548966 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 20 Feb 2007 01:07:13 +0100 Subject: {rd,wr}msr_on_cpu SMP=n optimization Let's save a few bytes in the CONFIG_SMP=n case. Signed-off-by: Adrian Bunk Signed-off-by: Dave Jones --- include/asm-i386/msr.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/asm-i386/msr.h') diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 3516a1f..8c35f3d 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h @@ -83,8 +83,19 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) : "c" (counter)) #endif /* !CONFIG_PARAVIRT */ +#ifdef CONFIG_SMP void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); +#else /* CONFIG_SMP */ +static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) +{ + rdmsr(msr_no, *l, *h); +} +static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) +{ + wrmsr(msr_no, l, h); +} +#endif /* CONFIG_SMP */ /* symbolic names for some interesting MSRs */ /* Intel defined MSRs. */ -- cgit v1.1