Commit 048eb582f3f89737d4a29668de9935e6feea7c36

Authored by Sam Ravnborg
1 parent 39e01cb874

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>

Showing 20 changed files with 28 additions and 52 deletions Side-by-side Diff

... ... @@ -13,6 +13,13 @@
13 13 targets := $(offsets-file)
14 14 targets += arch/$(ARCH)/kernel/asm-offsets.s
15 15  
  16 +# Default sed regexp - multiline due to syntax constraints
  17 +define sed-y
  18 + "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
  19 +endef
  20 +# Override default regexp for specific architectures
  21 +sed-$(CONFIG_MIPS) := "/^@@@/s///p"
  22 +
16 23 quiet_cmd_offsets = GEN $@
17 24 define cmd_offsets
18 25 cat $< | \
... ... @@ -26,7 +33,7 @@
26 33 echo " *"; \
27 34 echo " */"; \
28 35 echo ""; \
29   - sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
  36 + sed -ne $(sed-y); \
30 37 echo ""; \
31 38 echo "#endif" ) > $@
32 39 endef
... ... @@ -720,39 +720,8 @@
720 720 @$(MAKE) $(clean)=arch/mips/boot
721 721 @$(MAKE) $(clean)=arch/mips/lasat
722 722  
723   -# Generate <asm/offset.h
724   -#
725   -# The default rule is suffering from funny problems on MIPS so we using our
726   -# own ...
727   -#
728   -# ---------------------------------------------------------------------------
729 723  
730   -define filechk_gen-asm-offset.h
731   - (set -e; \
732   - echo "#ifndef _ASM_OFFSET_H"; \
733   - echo "#define _ASM_OFFSET_H"; \
734   - echo "/*"; \
735   - echo " * DO NOT MODIFY."; \
736   - echo " *"; \
737   - echo " * This file was generated by arch/$(ARCH)/Makefile"; \
738   - echo " *"; \
739   - echo " */"; \
740   - echo ""; \
741   - sed -ne "/^@@@/s///p"; \
742   - echo "#endif /* _ASM_OFFSET_H */" )
743   -endef
744   -
745   -prepare: include/asm-$(ARCH)/offset.h
746   -
747   -arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
748   - include/config/MARKER
749   -
750   -include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
751   - $(call filechk,gen-asm-offset.h)
752   -
753   -CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
754   - include/asm-$(ARCH)/offset.h \
755   - vmlinux.32 \
  724 +CLEAN_FILES += vmlinux.32 \
756 725 vmlinux.64 \
757 726 vmlinux.ecoff
arch/mips/kernel/r2300_fpu.S
... ... @@ -15,7 +15,7 @@
15 15 #include <asm/errno.h>
16 16 #include <asm/fpregdef.h>
17 17 #include <asm/mipsregs.h>
18   -#include <asm/offset.h>
  18 +#include <asm/asm-offsets.h>
19 19 #include <asm/regdef.h>
20 20  
21 21 #define EX(a,b) \
arch/mips/kernel/r2300_switch.S
... ... @@ -15,7 +15,7 @@
15 15 #include <asm/cachectl.h>
16 16 #include <asm/fpregdef.h>
17 17 #include <asm/mipsregs.h>
18   -#include <asm/offset.h>
  18 +#include <asm/asm-offsets.h>
19 19 #include <asm/page.h>
20 20 #include <asm/regdef.h>
21 21 #include <asm/stackframe.h>
arch/mips/kernel/r4k_fpu.S
... ... @@ -17,7 +17,7 @@
17 17 #include <asm/errno.h>
18 18 #include <asm/fpregdef.h>
19 19 #include <asm/mipsregs.h>
20   -#include <asm/offset.h>
  20 +#include <asm/asm-offsets.h>
21 21 #include <asm/regdef.h>
22 22  
23 23 .macro EX insn, reg, src
arch/mips/kernel/r4k_switch.S
... ... @@ -15,7 +15,7 @@
15 15 #include <asm/cachectl.h>
16 16 #include <asm/fpregdef.h>
17 17 #include <asm/mipsregs.h>
18   -#include <asm/offset.h>
  18 +#include <asm/asm-offsets.h>
19 19 #include <asm/page.h>
20 20 #include <asm/pgtable-bits.h>
21 21 #include <asm/regdef.h>
arch/mips/kernel/r6000_fpu.S
... ... @@ -13,7 +13,7 @@
13 13 #include <asm/asm.h>
14 14 #include <asm/fpregdef.h>
15 15 #include <asm/mipsregs.h>
16   -#include <asm/offset.h>
  16 +#include <asm/asm-offsets.h>
17 17 #include <asm/regdef.h>
18 18  
19 19 .set noreorder
arch/mips/kernel/scall32-o32.S
... ... @@ -19,7 +19,7 @@
19 19 #include <asm/thread_info.h>
20 20 #include <asm/unistd.h>
21 21 #include <asm/war.h>
22   -#include <asm/offset.h>
  22 +#include <asm/asm-offsets.h>
23 23  
24 24 /* Highest syscall used of any syscall flavour */
25 25 #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls
arch/mips/kernel/scall64-64.S
... ... @@ -14,7 +14,7 @@
14 14 #include <asm/mipsregs.h>
15 15 #include <asm/regdef.h>
16 16 #include <asm/stackframe.h>
17   -#include <asm/offset.h>
  17 +#include <asm/asm-offsets.h>
18 18 #include <asm/sysmips.h>
19 19 #include <asm/thread_info.h>
20 20 #include <asm/unistd.h>
arch/mips/kernel/syscall.c
... ... @@ -31,7 +31,7 @@
31 31 #include <asm/cachectl.h>
32 32 #include <asm/cacheflush.h>
33 33 #include <asm/ipc.h>
34   -#include <asm/offset.h>
  34 +#include <asm/asm-offsets.h>
35 35 #include <asm/signal.h>
36 36 #include <asm/sim.h>
37 37 #include <asm/shmparam.h>
arch/mips/lib-32/memset.S
... ... @@ -7,7 +7,7 @@
7 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 8 */
9 9 #include <asm/asm.h>
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12  
13 13 #define EX(insn,reg,addr,handler) \
arch/mips/lib-64/memset.S
... ... @@ -7,7 +7,7 @@
7 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 8 */
9 9 #include <asm/asm.h>
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12  
13 13 #define EX(insn,reg,addr,handler) \
arch/mips/lib/memcpy.S
... ... @@ -14,7 +14,7 @@
14 14 */
15 15 #include <linux/config.h>
16 16 #include <asm/asm.h>
17   -#include <asm/offset.h>
  17 +#include <asm/asm-offsets.h>
18 18 #include <asm/regdef.h>
19 19  
20 20 #define dst a0
arch/mips/lib/strlen_user.S
... ... @@ -7,7 +7,7 @@
7 7 * Copyright (c) 1999 Silicon Graphics, Inc.
8 8 */
9 9 #include <asm/asm.h>
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12  
13 13 #define EX(insn,reg,addr,handler) \
arch/mips/lib/strncpy_user.S
... ... @@ -7,7 +7,7 @@
7 7 */
8 8 #include <linux/errno.h>
9 9 #include <asm/asm.h>
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12  
13 13 #define EX(insn,reg,addr,handler) \
arch/mips/lib/strnlen_user.S
... ... @@ -7,7 +7,7 @@
7 7 * Copyright (c) 1999 Silicon Graphics, Inc.
8 8 */
9 9 #include <asm/asm.h>
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12  
13 13 #define EX(insn,reg,addr,handler) \
include/asm-mips/asmmacro-32.h
... ... @@ -7,7 +7,7 @@
7 7 #ifndef _ASM_ASMMACRO_32_H
8 8 #define _ASM_ASMMACRO_32_H
9 9  
10   -#include <asm/offset.h>
  10 +#include <asm/asm-offsets.h>
11 11 #include <asm/regdef.h>
12 12 #include <asm/fpregdef.h>
13 13 #include <asm/mipsregs.h>
include/asm-mips/asmmacro-64.h
... ... @@ -8,7 +8,7 @@
8 8 #ifndef _ASM_ASMMACRO_64_H
9 9 #define _ASM_ASMMACRO_64_H
10 10  
11   -#include <asm/offset.h>
  11 +#include <asm/asm-offsets.h>
12 12 #include <asm/regdef.h>
13 13 #include <asm/fpregdef.h>
14 14 #include <asm/mipsregs.h>
include/asm-mips/sim.h
... ... @@ -11,7 +11,7 @@
11 11  
12 12 #include <linux/config.h>
13 13  
14   -#include <asm/offset.h>
  14 +#include <asm/asm-offsets.h>
15 15  
16 16 #define __str2(x) #x
17 17 #define __str(x) __str2(x)
include/asm-mips/stackframe.h
... ... @@ -15,7 +15,7 @@
15 15  
16 16 #include <asm/asm.h>
17 17 #include <asm/mipsregs.h>
18   -#include <asm/offset.h>
  18 +#include <asm/asm-offsets.h>
19 19  
20 20 .macro SAVE_AT
21 21 .set push