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>
This commit is contained in:
Sam Ravnborg 2005-09-09 22:32:31 +02:00
parent 39e01cb874
commit 048eb582f3
20 changed files with 27 additions and 51 deletions

9
Kbuild
View file

@ -13,6 +13,13 @@ always := $(offsets-file)
targets := $(offsets-file) targets := $(offsets-file)
targets += arch/$(ARCH)/kernel/asm-offsets.s 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 $@ quiet_cmd_offsets = GEN $@
define cmd_offsets define cmd_offsets
cat $< | \ cat $< | \
@ -26,7 +33,7 @@ define cmd_offsets
echo " *"; \ echo " *"; \
echo " */"; \ echo " */"; \
echo ""; \ echo ""; \
sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ sed -ne $(sed-y); \
echo ""; \ echo ""; \
echo "#endif" ) > $@ echo "#endif" ) > $@
endef endef

View file

@ -720,38 +720,7 @@ archclean:
@$(MAKE) $(clean)=arch/mips/boot @$(MAKE) $(clean)=arch/mips/boot
@$(MAKE) $(clean)=arch/mips/lasat @$(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 CLEAN_FILES += vmlinux.32 \
(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 \
vmlinux.64 \ vmlinux.64 \
vmlinux.ecoff vmlinux.ecoff

View file

@ -15,7 +15,7 @@
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(a,b) \ #define EX(a,b) \

View file

@ -15,7 +15,7 @@
#include <asm/cachectl.h> #include <asm/cachectl.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#include <asm/stackframe.h> #include <asm/stackframe.h>

View file

@ -17,7 +17,7 @@
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
.macro EX insn, reg, src .macro EX insn, reg, src

View file

@ -15,7 +15,7 @@
#include <asm/cachectl.h> #include <asm/cachectl.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable-bits.h> #include <asm/pgtable-bits.h>
#include <asm/regdef.h> #include <asm/regdef.h>

View file

@ -13,7 +13,7 @@
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
.set noreorder .set noreorder

View file

@ -19,7 +19,7 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/war.h> #include <asm/war.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
/* Highest syscall used of any syscall flavour */ /* Highest syscall used of any syscall flavour */
#define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls

View file

@ -14,7 +14,7 @@
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#include <asm/stackframe.h> #include <asm/stackframe.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/sysmips.h> #include <asm/sysmips.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/unistd.h> #include <asm/unistd.h>

View file

@ -31,7 +31,7 @@
#include <asm/cachectl.h> #include <asm/cachectl.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/ipc.h> #include <asm/ipc.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/signal.h> #include <asm/signal.h>
#include <asm/sim.h> #include <asm/sim.h>
#include <asm/shmparam.h> #include <asm/shmparam.h>

View file

@ -7,7 +7,7 @@
* Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/ */
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \ #define EX(insn,reg,addr,handler) \

View file

@ -7,7 +7,7 @@
* Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/ */
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \ #define EX(insn,reg,addr,handler) \

View file

@ -14,7 +14,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define dst a0 #define dst a0

View file

@ -7,7 +7,7 @@
* Copyright (c) 1999 Silicon Graphics, Inc. * Copyright (c) 1999 Silicon Graphics, Inc.
*/ */
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \ #define EX(insn,reg,addr,handler) \

View file

@ -7,7 +7,7 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \ #define EX(insn,reg,addr,handler) \

View file

@ -7,7 +7,7 @@
* Copyright (c) 1999 Silicon Graphics, Inc. * Copyright (c) 1999 Silicon Graphics, Inc.
*/ */
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define EX(insn,reg,addr,handler) \ #define EX(insn,reg,addr,handler) \

View file

@ -7,7 +7,7 @@
#ifndef _ASM_ASMMACRO_32_H #ifndef _ASM_ASMMACRO_32_H
#define _ASM_ASMMACRO_32_H #define _ASM_ASMMACRO_32_H
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>

View file

@ -8,7 +8,7 @@
#ifndef _ASM_ASMMACRO_64_H #ifndef _ASM_ASMMACRO_64_H
#define _ASM_ASMMACRO_64_H #define _ASM_ASMMACRO_64_H
#include <asm/offset.h> #include <asm/asm-offsets.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#include <asm/fpregdef.h> #include <asm/fpregdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>

View file

@ -11,7 +11,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
#define __str2(x) #x #define __str2(x) #x
#define __str(x) __str2(x) #define __str(x) __str2(x)

View file

@ -15,7 +15,7 @@
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/offset.h> #include <asm/asm-offsets.h>
.macro SAVE_AT .macro SAVE_AT
.set push .set push