aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/msr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/msr.h')
-rw-r--r--include/asm-x86/msr.h33
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
143void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
144void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
145int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
146int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
147#else /* CONFIG_SMP */
148static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
149{
150 rdmsr(msr_no, *l, *h);
151}
152static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
153{
154 wrmsr(msr_no, l, h);
155}
156static 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}
160static 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
331void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 314void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
332void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 315void 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