diff options
Diffstat (limited to 'include/asm-x86_64/msr.h')
-rw-r--r-- | include/asm-x86_64/msr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 2aac15a1290fc..66f0be191ab4f 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h @@ -80,6 +80,18 @@ extern inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, : "0" (op)); } +/* Some CPUID calls want 'count' to be placed in ecx */ +static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, + int *edx) +{ + __asm__("cpuid" + : "=a" (*eax), + "=b" (*ebx), + "=c" (*ecx), + "=d" (*edx) + : "0" (op), "c" (count)); +} + /* * CPUID functions returning a single datum */ |