All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UML - Implement current_text_addr
@ 2004-09-23  2:23 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2004-09-23  2:23 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, blaisorblade_spam

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.9-rc2-mm1-orig/include/asm-um/processor-generic.h
===================================================================
--- linux-2.6.9-rc2-mm1-orig.orig/include/asm-um/processor-generic.h	2004-09-22 19:51:02.000000000 -0400
+++ linux-2.6.9-rc2-mm1-orig/include/asm-um/processor-generic.h	2004-09-22 20:29:01.000000000 -0400
@@ -16,8 +16,6 @@
 
 struct mm_struct;
 
-#define current_text_addr() ((void *) 0)
-
 #define cpu_relax()   barrier()
 
 struct thread_struct {
Index: linux-2.6.9-rc2-mm1-orig/include/asm-um/processor-i386.h
===================================================================
--- linux-2.6.9-rc2-mm1-orig.orig/include/asm-um/processor-i386.h	2004-09-22 19:51:02.000000000 -0400
+++ linux-2.6.9-rc2-mm1-orig/include/asm-um/processor-i386.h	2004-09-22 20:29:01.000000000 -0400
@@ -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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-23  1:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23  2:23 [PATCH] UML - Implement current_text_addr Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.