Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80034
b: refs/heads/master
c: 0ccb8ac
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 90f31e2 commit 4a5b1b3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 683e0253dbd12554b2ee969b15e68105252bff57
refs/heads/master: 0ccb8acc51693a2aef0f38024943808046d81251
11 changes: 11 additions & 0 deletions trunk/include/asm-x86/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ struct mm_struct;
#include <asm/page.h>
#include <asm/system.h>

/*
* 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)
{
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/asm-x86/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
#include <linux/init.h>
#include <asm/desc_defs.h>

/*
* 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
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/asm-x86/processor_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
#include <linux/cpumask.h>
#include <asm/desc_defs.h>

/*
* 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.
*/
Expand Down

0 comments on commit 4a5b1b3

Please sign in to comment.