From 4a5b1b36e3351ee3ceb7470f71936119d825b7b4 Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Wed, 30 Jan 2008 13:31:27 +0100 Subject: [PATCH] --- yaml --- r: 80034 b: refs/heads/master c: 0ccb8acc51693a2aef0f38024943808046d81251 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-x86/processor.h | 11 +++++++++++ trunk/include/asm-x86/processor_32.h | 6 ------ trunk/include/asm-x86/processor_64.h | 6 ------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 324f5ba20651..1c663900b781 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 683e0253dbd12554b2ee969b15e68105252bff57 +refs/heads/master: 0ccb8acc51693a2aef0f38024943808046d81251 diff --git a/trunk/include/asm-x86/processor.h b/trunk/include/asm-x86/processor.h index 52e3637ef59e..3deb5ba55f55 100644 --- a/trunk/include/asm-x86/processor.h +++ b/trunk/include/asm-x86/processor.h @@ -10,6 +10,17 @@ struct mm_struct; #include #include +/* + * Default implementation of macro that returns current + * instruction pointer ("program counter"). + */ +static inline void *current_text_addr(void) +{ + void *pc; + asm volatile("mov $1f,%0\n1:":"=r" (pc)); + return pc; +} + static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { diff --git a/trunk/include/asm-x86/processor_32.h b/trunk/include/asm-x86/processor_32.h index 9e119d3789b4..6cd2149dcbad 100644 --- a/trunk/include/asm-x86/processor_32.h +++ b/trunk/include/asm-x86/processor_32.h @@ -21,12 +21,6 @@ #include #include -/* - * Default implementation of macro that returns current - * instruction pointer ("program counter"). - */ -#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; }) - /* * CPU type and hardware bug flags. Kept separately for each CPU. * Members of this structure are referenced in head.S, so think twice diff --git a/trunk/include/asm-x86/processor_64.h b/trunk/include/asm-x86/processor_64.h index 5f5c7fc63797..1984a4a38b74 100644 --- a/trunk/include/asm-x86/processor_64.h +++ b/trunk/include/asm-x86/processor_64.h @@ -20,12 +20,6 @@ #include #include -/* - * Default implementation of macro that returns current - * instruction pointer ("program counter"). - */ -#define current_text_addr() ({ void *pc; asm volatile("leaq 1f(%%rip),%0\n1:":"=r"(pc)); pc; }) - /* * CPU type and hardware bug flags. Kept separately for each CPU. */