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.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index 5c95d0be1132..0648b2d57a38 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -203,73 +203,6 @@ static inline int wrmsr_safe(u32 __msr, u32 __low, u32 __high)
203 : "c" (counter)) 203 : "c" (counter))
204 204
205 205
206static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx,
207 unsigned int *ecx, unsigned int *edx)
208{
209 __asm__("cpuid"
210 : "=a" (*eax),
211 "=b" (*ebx),
212 "=c" (*ecx),
213 "=d" (*edx)
214 : "0" (op));
215}
216
217/* Some CPUID calls want 'count' to be placed in ecx */
218static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx,
219 int *edx)
220{
221 __asm__("cpuid"
222 : "=a" (*eax),
223 "=b" (*ebx),
224 "=c" (*ecx),
225 "=d" (*edx)
226 : "0" (op), "c" (count));
227}
228
229/*
230 * CPUID functions returning a single datum
231 */
232static inline unsigned int cpuid_eax(unsigned int op)
233{
234 unsigned int eax;
235
236 __asm__("cpuid"
237 : "=a" (eax)
238 : "0" (op)
239 : "bx", "cx", "dx");
240 return eax;
241}
242static inline unsigned int cpuid_ebx(unsigned int op)
243{
244 unsigned int eax, ebx;
245
246 __asm__("cpuid"
247 : "=a" (eax), "=b" (ebx)
248 : "0" (op)
249 : "cx", "dx" );
250 return ebx;
251}
252static inline unsigned int cpuid_ecx(unsigned int op)
253{
254 unsigned int eax, ecx;
255
256 __asm__("cpuid"
257 : "=a" (eax), "=c" (ecx)
258 : "0" (op)
259 : "bx", "dx" );
260 return ecx;
261}
262static inline unsigned int cpuid_edx(unsigned int op)
263{
264 unsigned int eax, edx;
265
266 __asm__("cpuid"
267 : "=a" (eax), "=d" (edx)
268 : "0" (op)
269 : "bx", "cx");
270 return edx;
271}
272
273#ifdef __KERNEL__ 206#ifdef __KERNEL__
274 207
275/* wrmsr with exception handling */ 208/* wrmsr with exception handling */