diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-02-19 19:07:13 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2007-02-20 14:29:37 -0500 |
commit | b44755cfaa72e7ed3d831a946bb4e7dfe7548966 (patch) | |
tree | 251cf0ab5aa9c39bab3f0981ab96021b5523bee3 /include/asm-x86_64 | |
parent | 48ac3271e52d23ee987da93f80d20f6bec8e6717 (diff) |
{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 <bunk@stusta.de>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r-- | include/asm-x86_64/msr.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 995a2b5fb26b..902f9a58617e 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -160,8 +160,19 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
160 | #define MSR_IA32_UCODE_WRITE 0x79 | 160 | #define MSR_IA32_UCODE_WRITE 0x79 |
161 | #define MSR_IA32_UCODE_REV 0x8b | 161 | #define MSR_IA32_UCODE_REV 0x8b |
162 | 162 | ||
163 | #ifdef CONFIG_SMP | ||
163 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 164 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
164 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 165 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
166 | #else /* CONFIG_SMP */ | ||
167 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
168 | { | ||
169 | rdmsr(msr_no, *l, *h); | ||
170 | } | ||
171 | static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
172 | { | ||
173 | wrmsr(msr_no, l, h); | ||
174 | } | ||
175 | #endif /* CONFIG_SMP */ | ||
165 | 176 | ||
166 | #endif | 177 | #endif |
167 | 178 | ||