Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: cris use generic asm-offsets.h support

Cris has a dedicated asm-offsets.c file per subarchitecture.
So a symlink is created to put the desired asm-offsets.c file
in $(ARCH)/kernel
This is absolutely not good practice, but it was the trick
used in the rest of the cris code.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

+4 -10
+2 -8
arch/cris/Makefile
··· 107 107 rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img 108 108 rm -rf $(LD_SCRIPT).tmp 109 109 110 - prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch \ 111 - include/asm-$(ARCH)/$(SARCH)/offset.h 110 + prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch 112 111 113 112 # Create some links to make all tools happy 114 113 $(SRC_ARCH)/.links: ··· 119 120 @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib 120 121 @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch 121 122 @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S 123 + @ln -sfn $(SRC_ARCH)/$(SARCH)/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c 122 124 @touch $@ 123 125 124 126 # Create link to sub arch includes ··· 128 128 @rm -f include/asm-$(ARCH)/arch 129 129 @ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch 130 130 @touch $@ 131 - 132 - arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ 133 - include/config/MARKER 134 - 135 - include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s 136 - $(call filechk,gen-asm-offsets)
+1 -1
arch/cris/arch-v10/kernel/entry.S
··· 270 270 #include <asm/arch/sv_addr_ag.h> 271 271 #include <asm/errno.h> 272 272 #include <asm/thread_info.h> 273 - #include <asm/arch/offset.h> 273 + #include <asm/asm-offsets.h> 274 274 #include <asm/page.h> 275 275 #include <asm/pgtable.h> 276 276
+1 -1
arch/cris/arch-v32/kernel/entry.S
··· 23 23 #include <asm/unistd.h> 24 24 #include <asm/errno.h> 25 25 #include <asm/thread_info.h> 26 - #include <asm/arch/offset.h> 26 + #include <asm/asm-offsets.h> 27 27 28 28 #include <asm/arch/hwregs/asm/reg_map_asm.h> 29 29 #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h>