Commit 048eb582f3f89737d4a29668de9935e6feea7c36
1 parent
39e01cb874
Exists in
master
and in
39 other branches
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
- 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
Kbuild
... | ... | @@ -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 |
arch/mips/Makefile
... | ... | @@ -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
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
... | ... | @@ -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
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