UML - Implement current_text_addr
PATCH 1/1 UML - Implement current_text_addr
Signed-off-by Paolo 'Blaisorblade' Giarrusso <[email protected]>
Signed-off-by Jeff Dike <[email protected]>
include/asm-um/processor-generic.h +0 -2
@@ -16,8 +16,6 @@struct mm_struct ; -#define current_text_addr () ((void *) 0) -#define cpu_relax () barrier()struct thread_struct {
include/asm-um/processor-i386.h +7 -0
@@ -19,6 +19,13 @@#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" #endif