]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kbuild: mips use generic asm-offsets.h support
authorSam Ravnborg <sam@mars.(none)>
Fri, 9 Sep 2005 20:32:31 +0000 (22:32 +0200)
committerSam Ravnborg <sam@mars.(none)>
Fri, 9 Sep 2005 20:32:31 +0000 (22:32 +0200)
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>
20 files changed:
Kbuild
arch/mips/Makefile
arch/mips/kernel/r2300_fpu.S
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/r4k_fpu.S
arch/mips/kernel/r4k_switch.S
arch/mips/kernel/r6000_fpu.S
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/syscall.c
arch/mips/lib-32/memset.S
arch/mips/lib-64/memset.S
arch/mips/lib/memcpy.S
arch/mips/lib/strlen_user.S
arch/mips/lib/strncpy_user.S
arch/mips/lib/strnlen_user.S
include/asm-mips/asmmacro-32.h
include/asm-mips/asmmacro-64.h
include/asm-mips/sim.h
include/asm-mips/stackframe.h

diff --git a/Kbuild b/Kbuild
index 197ece85034ba8ad983af531597b6b40610aa2c6..1880e6f760aab05f139d74400d2477e7c47681da 100644 (file)
--- 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
index b0fdaee8d8d95228a810f23ed680e7134022f4ee..346e803f153bc30d078c10981382c907439b5176 100644 (file)
@@ -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
index f83c31f720c4d67efeb86008bc917644f3924712..ac68e68339db6957c63a322a62ed93fa6b381152 100644 (file)
@@ -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)                                                        \
index f10019640ee997847d1e7548cd4971efb5afd437..0d9c4a32a9c2dbc617fb727dd67f9d00bc509718 100644 (file)
@@ -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>
index aba665bcb3864e22b73c69f4ec7c94ae39199d29..1a14c6b18829992afb2d16a08988ae83bd608f89 100644 (file)
@@ -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
index e02b7722ccb8d1753e073bf85eb08b18849f7f8f..d2afbd19a9c8a0c013b4170008d55a18d701e61c 100644 (file)
@@ -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>
index d8d3b13fe57ffa7c1a037e9d8d6afd8bcaeb7185..43cda53f5af6866db959d054c2b8fea2b4e46077 100644 (file)
@@ -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
index 344f2e29eb616816da5cf0de6ed95a219f6d6958..17b5030fb6ea2db5eb4749cb7ae9c93a3ed66258 100644 (file)
@@ -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
index 32efb888160abf7ffb245ab6720f3bc8c0dcb1ec..ffb22a2068bf960a95291b7063ca83424ee44f43 100644 (file)
@@ -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>
index ae2a1312d4efe1e06f98fa999b1029fbffa8517a..21e3e13a4b4466386636a8fa571e18ed5495eabb 100644 (file)
@@ -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>
index ad9ff4071ce9238f208efd82a1e7f05cc77dec45..1981485bd48b7f34120d0a70aa1fb4dcc74e5d3c 100644 (file)
@@ -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)                      \
index 242f1976cfaf097e504a1ce86e207a3300deab03..e2c42c85113b32b3fbd460b6ed58281df275067d 100644 (file)
@@ -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)                      \
index 90ee8d43261f591d2f509bf10ae7c6981e6bc3b5..a78865f76547848d3cc1a1b495e6a6360dfc79ff 100644 (file)
@@ -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
index 07660e86c99dadf8a4a3981c91481420ee68e9e9..eca558d83a3730e7fe83890cb2144e1ab792495f 100644 (file)
@@ -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)                      \
index 14bed17c1648a70d178238c5f465fee4be97a9a3..d16c76fbfac721c5cdaf20d33628c948ca83571c 100644 (file)
@@ -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)                      \
index 6e7a8eed4de8f222ef61ee296f1c8d5b46144056..c0ea15194a0e8d132979de4a0ad02ab6e9cf9378 100644 (file)
@@ -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)                      \
index ac8823df255461a30d9a8b91538a5b9704a70b05..11daf5ceb7b4e6daebeb8a25690386521f397353 100644 (file)
@@ -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>
index bbed35511f5a79d61b22437de45d6a1c96a86ca4..559c355b9b868e007461fea60c17d4c4d6ac36f2 100644 (file)
@@ -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>
index 3ccfe09fa744c0bdc702ac0c9a8e7cbc4d0d9856..9c2af1b00e19732f07f1cebd1ec6ec0a2a9de331 100644 (file)
@@ -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)
index fb42f99f85278adffcf6c41aa5f94f1378e7750b..7b5e64600bc894e980180a33d710fa2e4e9d2fdc 100644 (file)
@@ -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