Add the ability to pass comments into asm-offsets.h by generating asm
output like
-># comment line
Mips needs this feature to preserve the comments that are in asm-mips/asm-offsets.h
right now.
Then remove the special handling for mips from Kbuild and convert mips to use
the new string to include the comments.
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
Kbuild | 6
arch/mips/kernel/asm-offsets.c | 416 ++++++++++++++++++++---------------------
2 files changed, 211 insertions(+), 211 deletions(-)
Index: linux-2.6.25-rc8-mm2/Kbuild
===================================================================
--- linux-2.6.25-rc8-mm2.orig/Kbuild 2008-04-12 17:15:40.348425313 -0700
+++ linux-2.6.25-rc8-mm2/Kbuild 2008-04-12 18:37:06.707178187 -0700
@@ -52,10 +52,10 @@ targets += arch/$(SRCARCH)/kernel/asm-of
# Default sed regexp - multiline due to syntax constraints
define sed-y
- "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
+ "/^->/{s:->#\(.*\):/* \1 */:; \
+ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:->::; p;}"
endef
-# Override default regexp for specific architectures
-sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
quiet_cmd_offsets = GEN $@
define cmd_offsets
Index: linux-2.6.25-rc8-mm2/arch/mips/kernel/asm-offsets.c
===================================================================
--- linux-2.6.25-rc8-mm2.orig/arch/mips/kernel/asm-offsets.c 2008-04-12 17:15:40.358425147 -0700
+++ linux-2.6.25-rc8-mm2/arch/mips/kernel/asm-offsets.c 2008-04-12 18:35:42.347183915 -0700
@@ -17,252 +17,252 @@
#include <asm/ptrace.h>
#include <asm/processor.h>
-#define text(t) __asm__("\n@@@" t)
+#define text(t) __asm__("\n->#" t)
#define _offset(type, member) (&(((type *)NULL)->member))
#define offset(string, ptr, member) \
- __asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
+ __asm__("\n->" ...