aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/processor.h18
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) \
223static 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 */
235native_cpuid_reg(eax)
236native_cpuid_reg(ebx)
237native_cpuid_reg(ecx)
238native_cpuid_reg(edx)
239
222static inline void load_cr3(pgd_t *pgdir) 240static inline void load_cr3(pgd_t *pgdir)
223{ 241{
224 write_cr3(__pa(pgdir)); 242 write_cr3(__pa(pgdir));