summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.(none)>2005-09-09 22:32:31 +0200
committerSam Ravnborg <sam@mars.(none)>2005-09-09 22:32:31 +0200
commit048eb582f3f89737d4a29668de9935e6feea7c36 (patch)
tree515b3a1b72769d181eed020e166ece0d31b77446
parent39e01cb874cbf694bd0b0c44f54c4f270e2aa556 (diff)
kbuild: mips use generic asm-offsets.h support
Removed obsolete stuff from arch makefile. mips had a special rule for generating asm-offsets.h so preserved it using an architecture specific hook in top-level Kbuild file. Renamed .h file to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--Kbuild9
-rw-r--r--arch/mips/Makefile35
-rw-r--r--arch/mips/kernel/r2300_fpu.S2
-rw-r--r--arch/mips/kernel/r2300_switch.S2
-rw-r--r--arch/mips/kernel/r4k_fpu.S2
-rw-r--r--arch/mips/kernel/r4k_switch.S2
-rw-r--r--arch/mips/kernel/r6000_fpu.S2
-rw-r--r--arch/mips/kernel/scall32-o32.S2
-rw-r--r--arch/mips/kernel/scall64-64.S2
-rw-r--r--arch/mips/kernel/syscall.c2
-rw-r--r--arch/mips/lib-32/memset.S2
-rw-r--r--arch/mips/lib-64/memset.S2
-rw-r--r--arch/mips/lib/memcpy.S2
-rw-r--r--arch/mips/lib/strlen_user.S2
-rw-r--r--arch/mips/lib/strncpy_user.S2
-rw-r--r--arch/mips/lib/strnlen_user.S2
-rw-r--r--include/asm-mips/asmmacro-32.h2
-rw-r--r--include/asm-mips/asmmacro-64.h2
-rw-r--r--include/asm-mips/sim.h2
-rw-r--r--include/asm-mips/stackframe.h2
20 files changed, 28 insertions, 52 deletions
diff --git a/Kbuild b/Kbuild
index 197ece85034..1880e6f760a 100644
--- a/Kbuild
+++ b/Kbuild
@@ -13,6 +13,13 @@ always := $(offsets-file)
targets := $(offsets-file)
targets += arch/$(ARCH)/kernel/asm-offsets.s
+# Default sed regexp - multiline due to syntax constraints
+define sed-y
+ "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
+endef
+# Override default regexp for specific architectures
+sed-$(CONFIG_MIPS) := "/^@@@/s///p"
+
quiet_cmd_offsets = GEN $@
define cmd_offsets
cat $< | \
@@ -26,7 +33,7 @@ define cmd_offsets
echo " *"; \
echo " */"; \
echo ""; \
- sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
+ sed -ne $(sed-y); \
echo ""; \
echo "#endif" ) > $@
endef
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index b0fdaee8d8d..346e803f153 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -720,38 +720,7 @@ archclean:
@$(MAKE) $(clean)=arch/mips/boot
@$(MAKE) $(clean)=arch/mips/lasat
-# Generate <asm/offset.h
-#
-# The default rule is suffering from funny problems on MIPS so we using our
-# own ...
-#
-# ---------------------------------------------------------------------------
-
-define filechk_gen-asm-offset.h
- (set -e; \
- echo "#ifndef _ASM_OFFSET_H"; \
- echo "#define _ASM_OFFSET_H"; \
- echo "/*"; \
- echo " * DO NOT MODIFY."; \
- echo " *"; \
- echo " * This file was generated by arch/$(ARCH)/Makefile"; \
- echo " *"; \
- echo " */"; \
- echo ""; \
- sed -ne "/^@@@/s///p"; \
- echo "#endif /* _ASM_OFFSET_H */" )
-endef
-
-prepare: include/asm-$(ARCH)/offset.h
-
-arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
- include/config/MARKER
-
-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
- $(call filechk,gen-asm-offset.h)
-
-CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
- include/asm-$(ARCH)/offset.h \
- vmlinux.32 \
+
+CLEAN_FILES += vmlinux.32 \
vmlinux.64 \
vmlinux.ecoff
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S
index f83c31f720c..ac68e68339d 100644
--- a/arch/mips/kernel/r2300_fpu.S
+++ b/arch/mips/kernel/r2300_fpu.S
@@ -15,7 +15,7 @@
#include <asm/errno.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(a,b) \
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index f10019640ee..0d9c4a32a9c 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -15,7 +15,7 @@
#include <asm/cachectl.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/page.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index aba665bcb38..1a14c6b1882 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -17,7 +17,7 @@
#include <asm/errno.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
.macro EX insn, reg, src
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index e02b7722ccb..d2afbd19a9c 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -15,7 +15,7 @@
#include <asm/cachectl.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/page.h>
#include <asm/pgtable-bits.h>
#include <asm/regdef.h>
diff --git a/arch/mips/kernel/r6000_fpu.S b/arch/mips/kernel/r6000_fpu.S
index d8d3b13fe57..43cda53f5af 100644
--- a/arch/mips/kernel/r6000_fpu.S
+++ b/arch/mips/kernel/r6000_fpu.S
@@ -13,7 +13,7 @@
#include <asm/asm.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
.set noreorder
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 344f2e29eb6..17b5030fb6e 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -19,7 +19,7 @@
#include <asm/thread_info.h>
#include <asm/unistd.h>
#include <asm/war.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
/* Highest syscall used of any syscall flavour */
#define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 32efb888160..ffb22a2068b 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -14,7 +14,7 @@
#include <asm/mipsregs.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/sysmips.h>
#include <asm/thread_info.h>
#include <asm/unistd.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index ae2a1312d4e..21e3e13a4b4 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -31,7 +31,7 @@
#include <asm/cachectl.h>
#include <asm/cacheflush.h>
#include <asm/ipc.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/signal.h>
#include <asm/sim.h>
#include <asm/shmparam.h>
diff --git a/arch/mips/lib-32/memset.S b/arch/mips/lib-32/memset.S
index ad9ff4071ce..1981485bd48 100644
--- a/arch/mips/lib-32/memset.S
+++ b/arch/mips/lib-32/memset.S
@@ -7,7 +7,7 @@
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \
diff --git a/arch/mips/lib-64/memset.S b/arch/mips/lib-64/memset.S
index 242f1976cfa..e2c42c85113 100644
--- a/arch/mips/lib-64/memset.S
+++ b/arch/mips/lib-64/memset.S
@@ -7,7 +7,7 @@
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S
index 90ee8d43261..a78865f7654 100644
--- a/arch/mips/lib/memcpy.S
+++ b/arch/mips/lib/memcpy.S
@@ -14,7 +14,7 @@
*/
#include <linux/config.h>
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define dst a0
diff --git a/arch/mips/lib/strlen_user.S b/arch/mips/lib/strlen_user.S
index 07660e86c99..eca558d83a3 100644
--- a/arch/mips/lib/strlen_user.S
+++ b/arch/mips/lib/strlen_user.S
@@ -7,7 +7,7 @@
* Copyright (c) 1999 Silicon Graphics, Inc.
*/
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \
diff --git a/arch/mips/lib/strncpy_user.S b/arch/mips/lib/strncpy_user.S
index 14bed17c164..d16c76fbfac 100644
--- a/arch/mips/lib/strncpy_user.S
+++ b/arch/mips/lib/strncpy_user.S
@@ -7,7 +7,7 @@
*/
#include <linux/errno.h>
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S
index 6e7a8eed4de..c0ea15194a0 100644
--- a/arch/mips/lib/strnlen_user.S
+++ b/arch/mips/lib/strnlen_user.S
@@ -7,7 +7,7 @@
* Copyright (c) 1999 Silicon Graphics, Inc.
*/
#include <asm/asm.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \
diff --git a/include/asm-mips/asmmacro-32.h b/include/asm-mips/asmmacro-32.h
index ac8823df255..11daf5ceb7b 100644
--- a/include/asm-mips/asmmacro-32.h
+++ b/include/asm-mips/asmmacro-32.h
@@ -7,7 +7,7 @@
#ifndef _ASM_ASMMACRO_32_H
#define _ASM_ASMMACRO_32_H
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
diff --git a/include/asm-mips/asmmacro-64.h b/include/asm-mips/asmmacro-64.h
index bbed35511f5..559c355b9b8 100644
--- a/include/asm-mips/asmmacro-64.h
+++ b/include/asm-mips/asmmacro-64.h
@@ -8,7 +8,7 @@
#ifndef _ASM_ASMMACRO_64_H
#define _ASM_ASMMACRO_64_H
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
diff --git a/include/asm-mips/sim.h b/include/asm-mips/sim.h
index 3ccfe09fa74..9c2af1b00e1 100644
--- a/include/asm-mips/sim.h
+++ b/include/asm-mips/sim.h
@@ -11,7 +11,7 @@
#include <linux/config.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
#define __str2(x) #x
#define __str(x) __str2(x)
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index fb42f99f852..7b5e64600bc 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -15,7 +15,7 @@
#include <asm/asm.h>
#include <asm/mipsregs.h>
-#include <asm/offset.h>
+#include <asm/asm-offsets.h>
.macro SAVE_AT
.set push