diff options
| -rw-r--r-- | arch/x86/include/asm/processor.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index eaf100508c36..1be64da0384e 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
| @@ -219,6 +219,24 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, | |||
| 219 | : "memory"); | 219 | : "memory"); |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | #define native_cpuid_reg(reg) \ | ||
| 223 | static inline unsigned int native_cpuid_##reg(unsigned int op) \ | ||
| 224 | { \ | ||
| 225 | unsigned int eax = op, ebx, ecx = 0, edx; \ | ||
| 226 | \ | ||
| 227 | native_cpuid(&eax, &ebx, &ecx, &edx); \ | ||
| 228 | \ | ||
| 229 | return reg; \ | ||
| 230 | } | ||
| 231 | |||
| 232 | /* | ||
| 233 | * Native CPUID functions returning a single datum. | ||
| 234 | */ | ||
| 235 | native_cpuid_reg(eax) | ||
| 236 | native_cpuid_reg(ebx) | ||
| 237 | native_cpuid_reg(ecx) | ||
| 238 | native_cpuid_reg(edx) | ||
| 239 | |||
| 222 | static inline void load_cr3(pgd_t *pgdir) | 240 | static inline void load_cr3(pgd_t *pgdir) |
| 223 | { | 241 | { |
| 224 | write_cr3(__pa(pgdir)); | 242 | write_cr3(__pa(pgdir)); |
