aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r--include/asm-x86/processor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 52e3637ef59e..3deb5ba55f55 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -10,6 +10,17 @@ struct mm_struct;
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/system.h> 11#include <asm/system.h>
12 12
13/*
14 * Default implementation of macro that returns current
15 * instruction pointer ("program counter").
16 */
17static inline void *current_text_addr(void)
18{
19 void *pc;
20 asm volatile("mov $1f,%0\n1:":"=r" (pc));
21 return pc;
22}
23
13static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, 24static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
14 unsigned int *ecx, unsigned int *edx) 25 unsigned int *ecx, unsigned int *edx)
15{ 26{