File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ always := $(offsets-file)
1313targets := $(offsets-file )
1414targets += arch/$(ARCH ) /kernel/asm-offsets.s
1515
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+
1623quiet_cmd_offsets = GEN $@
1724define cmd_offsets
1825 cat $< | \
@@ -26,7 +33,7 @@ define cmd_offsets
2633 echo " *"; \
2734 echo " */"; \
2835 echo ""; \
29- sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" ; \
36+ sed -ne $(sed-y) ; \
3037 echo ""; \
3138 echo "#endif" ) > $@
3239endef
Original file line number Diff line number Diff line change @@ -720,38 +720,7 @@ archclean:
720720 @$(MAKE ) $(clean ) =arch/mips/boot
721721 @$(MAKE ) $(clean ) =arch/mips/lasat
722722
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-
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 \
723+
724+ CLEAN_FILES += vmlinux.32 \
756725 vmlinux.64 \
757726 vmlinux.ecoff
Original file line number Diff line number Diff line change 1515#include <asm/errno.h>
1616#include <asm/fpregdef.h>
1717#include <asm/mipsregs.h>
18- #include <asm/offset .h>
18+ #include <asm/asm-offsets .h>
1919#include <asm/regdef.h>
2020
2121#define EX(a,b) \
Original file line number Diff line number Diff line change 1515#include <asm/cachectl.h>
1616#include <asm/fpregdef.h>
1717#include <asm/mipsregs.h>
18- #include <asm/offset .h>
18+ #include <asm/asm-offsets .h>
1919#include <asm/page.h>
2020#include <asm/regdef.h>
2121#include <asm/stackframe.h>
Original file line number Diff line number Diff line change 1717#include <asm/errno.h>
1818#include <asm/fpregdef.h>
1919#include <asm/mipsregs.h>
20- #include <asm/offset .h>
20+ #include <asm/asm-offsets .h>
2121#include <asm/regdef.h>
2222
2323 .macro EX insn, reg, src
Original file line number Diff line number Diff line change 1515#include <asm/cachectl.h>
1616#include <asm/fpregdef.h>
1717#include <asm/mipsregs.h>
18- #include <asm/offset .h>
18+ #include <asm/asm-offsets .h>
1919#include <asm/page.h>
2020#include <asm/pgtable-bits.h>
2121#include <asm/regdef.h>
Original file line number Diff line number Diff line change 1313#include <asm/asm.h>
1414#include <asm/fpregdef.h>
1515#include <asm/mipsregs.h>
16- #include <asm/offset .h>
16+ #include <asm/asm-offsets .h>
1717#include <asm/regdef.h>
1818
1919 .set noreorder
Original file line number Diff line number Diff line change 1919#include <asm/thread_info.h>
2020#include <asm/unistd.h>
2121#include <asm/war.h>
22- #include <asm/offset .h>
22+ #include <asm/asm-offsets .h>
2323
2424/* Highest syscall used of any syscall flavour */
2525#define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls
Original file line number Diff line number Diff line change 1414#include <asm/mipsregs.h>
1515#include <asm/regdef.h>
1616#include <asm/stackframe.h>
17- #include <asm/offset .h>
17+ #include <asm/asm-offsets .h>
1818#include <asm/sysmips.h>
1919#include <asm/thread_info.h>
2020#include <asm/unistd.h>
Original file line number Diff line number Diff line change 3131#include <asm/cachectl.h>
3232#include <asm/cacheflush.h>
3333#include <asm/ipc.h>
34- #include <asm/offset .h>
34+ #include <asm/asm-offsets .h>
3535#include <asm/signal.h>
3636#include <asm/sim.h>
3737#include <asm/shmparam.h>
You can’t perform that action at this time.
0 commit comments