Commit 3c7a74a7 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: implement current_text_addr

Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 17e03d0d
...@@ -16,8 +16,6 @@ struct task_struct; ...@@ -16,8 +16,6 @@ struct task_struct;
struct mm_struct; struct mm_struct;
#define current_text_addr() ((void *) 0)
#define cpu_relax() barrier() #define cpu_relax() barrier()
struct thread_struct { struct thread_struct {
......
...@@ -19,6 +19,13 @@ struct arch_thread { ...@@ -19,6 +19,13 @@ struct arch_thread {
#include "asm/arch/user.h" #include "asm/arch/user.h"
/*
* Default implementation of macro that returns current
* instruction pointer ("program counter"). Stolen
* from asm-i386/processor.h
*/
#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
#include "asm/processor-generic.h" #include "asm/processor-generic.h"
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment