diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:03 -0500 |
commit | 751de83c0c94a5235f14cff8549d3b39e745eb2b (patch) | |
tree | 54e4bd13f15f84d2536c6354894a5643658b6bb0 /include | |
parent | fe58fc8f40257948c2f9fc5a56863077ce3138f0 (diff) |
x86: unify msr smp funcs
The functions under #ifdef CONFIG_SMP in msr.h are the same
for both x86_64 and i386, and this patches removes one of them,
putting them in a single location
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/msr.h | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 80b027081b3c..5c95d0be1132 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -139,29 +139,6 @@ static inline int wrmsr_safe(u32 __msr, u32 __low, u32 __high) | |||
139 | } while(0) | 139 | } while(0) |
140 | #endif /* !CONFIG_PARAVIRT */ | 140 | #endif /* !CONFIG_PARAVIRT */ |
141 | 141 | ||
142 | #ifdef CONFIG_SMP | ||
143 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
144 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
145 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
146 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
147 | #else /* CONFIG_SMP */ | ||
148 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
149 | { | ||
150 | rdmsr(msr_no, *l, *h); | ||
151 | } | ||
152 | static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
153 | { | ||
154 | wrmsr(msr_no, l, h); | ||
155 | } | ||
156 | static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
157 | { | ||
158 | return rdmsr_safe(msr_no, l, h); | ||
159 | } | ||
160 | static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
161 | { | ||
162 | return wrmsr_safe(msr_no, l, h); | ||
163 | } | ||
164 | #endif /* CONFIG_SMP */ | ||
165 | #endif /* ! __ASSEMBLY__ */ | 142 | #endif /* ! __ASSEMBLY__ */ |
166 | #endif /* __KERNEL__ */ | 143 | #endif /* __KERNEL__ */ |
167 | 144 | ||
@@ -327,6 +304,12 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
327 | :"c"(msr), "i"(-EIO), "0"(0)); \ | 304 | :"c"(msr), "i"(-EIO), "0"(0)); \ |
328 | ret__; }) | 305 | ret__; }) |
329 | 306 | ||
307 | #endif /* __ASSEMBLY__ */ | ||
308 | |||
309 | #endif /* !__i386__ */ | ||
310 | |||
311 | #ifndef __ASSEMBLY__ | ||
312 | |||
330 | #ifdef CONFIG_SMP | 313 | #ifdef CONFIG_SMP |
331 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 314 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
332 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 315 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
@@ -351,8 +334,6 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
351 | } | 334 | } |
352 | #endif /* CONFIG_SMP */ | 335 | #endif /* CONFIG_SMP */ |
353 | #endif /* __KERNEL__ */ | 336 | #endif /* __KERNEL__ */ |
354 | #endif /* __ASSEMBLY__ */ | 337 | #endif /* __ASSEMBLY__ */ |
355 | |||
356 | #endif /* !__i386__ */ | ||
357 | 338 | ||
358 | #endif | 339 | #endif |