@@ -1117,6 +1117,10 @@ config SCHED_OMIT_FRAME_POINTER
bool
default y
+config HAVE_MACH_HEAD_FILES
+ bool
+ default n
+
#
# Select some configuration options automatically based on user selections.
#
@@ -263,7 +263,9 @@ load-y = $(CONFIG_PHYSICAL_START)
endif
entry-y = $(shell $(objtree)/arch/mips/tools/elf-entry vmlinux)
+ifndef CONFIG_HAVE_MACH_HEAD_FILES
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
+endif
drivers-$(CONFIG_PCI) += arch/mips/pci/
#
@@ -10,7 +10,11 @@
#ifndef _ASM_ADDRSPACE_H
#define _ASM_ADDRSPACE_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/spaces.h>
+#else
#include <spaces.h>
+#endif
/*
* Configure language
@@ -9,7 +9,11 @@
#ifndef _ASM_CACHE_H
#define _ASM_CACHE_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/kmalloc.h>
+#else
#include <kmalloc.h>
+#endif
#define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -12,7 +12,11 @@
#include <asm/cpu.h>
#include <asm/cpu-info.h>
#include <asm/isa-rev.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/cpu-feature-overrides.h>
+#else
#include <cpu-feature-overrides.h>
+#endif
#define __ase(ase) (cpu_data[0].ases & (ase))
#define __isa(isa) (cpu_data[0].isa_level & (isa))
@@ -14,7 +14,11 @@
#define _ASM_FIXMAP_H
#include <asm/page.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/spaces.h>
+#else
#include <spaces.h>
+#endif
#ifdef CONFIG_HIGHMEM
#include <linux/threads.h>
#include <asm/kmap_types.h>
@@ -51,6 +51,10 @@ static inline void fd_cacheflush(char * addr, long size)
#define EXTRA_FLOPPY_PARAMS
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/floppy.h>
+#else
#include <floppy.h>
+#endif
#endif /* _ASM_FLOPPY_H */
@@ -14,7 +14,11 @@
#include <linux/spinlock.h>
#include <asm/io.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/irq.h>
+#else
#include <irq.h>
+#endif
/* i8259A PIC registers */
#define PIC_MASTER_CMD 0x20
@@ -8,6 +8,12 @@
#ifndef __ASM_IDE_H
#define __ASM_IDE_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/ide.h>
+#else
#include <ide.h>
+#endif
#endif /* __ASM_IDE_H */
@@ -31,8 +31,13 @@
#include <asm/processor.h>
#include <asm/string.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/ioremap.h>
+#include <mach/mangle-port.h>
+#else
#include <ioremap.h>
#include <mangle-port.h>
+#endif
/*
* Raw operations are never swapped in software. OTOH values that raw
@@ -15,7 +15,11 @@
#include <asm/mipsmtregs.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/irq.h>
+#else
#include <irq.h>
+#endif
#define IRQ_STACK_SIZE THREAD_SIZE
#define IRQ_STACK_START (IRQ_STACK_SIZE - 16)
@@ -11,6 +11,10 @@
#ifndef _ASM_MC146818RTC_H
#define _ASM_MC146818RTC_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/mc146818rtc.h>
+#else
#include <mc146818rtc.h>
+#endif
#endif /* _ASM_MC146818RTC_H */
@@ -9,8 +9,12 @@
#include <asm/page.h>
#ifdef CONFIG_NEED_MULTIPLE_NODES
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/mmzone.h>
+#else
# include <mmzone.h>
#endif
+#endif
#ifndef pa_to_nid
#define pa_to_nid(addr) 0
@@ -9,7 +9,11 @@
#ifndef _ASM_PAGE_H
#define _ASM_PAGE_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/spaces.h>
+#else
#include <spaces.h>
+#endif
#include <linux/const.h>
#include <linux/kernel.h>
#include <asm/mipsregs.h>
@@ -8,7 +8,11 @@
#ifndef __ASM_TOPOLOGY_H
#define __ASM_TOPOLOGY_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/topology.h>
+#else
#include <topology.h>
+#endif
#include <linux/smp.h>
#ifdef CONFIG_SMP
@@ -9,7 +9,11 @@
#ifndef _ASM_WAR_H
#define _ASM_WAR_H
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/war.h>
+#else
#include <war.h>
+#endif
/*
* Work around certain R4000 CPU errata (as implemented by GCC):
@@ -24,7 +24,11 @@
#include <asm/mipsregs.h>
#include <asm/stackframe.h>
+#ifdef CONFIG_HAVE_MACH_HEAD_FILES
+#include <mach/kernel-entry-init.h>
+#else
#include <kernel-entry-init.h>
+#endif
/*
* For the moment disable interrupts, mark the kernel mode and
Some header files are used without pathname prefix, it will cause confliction if there exists the same filename locally. This patch adds HAVE_MACH_HEAD_FILES option, with this enabled, it will remove header files platform specific from arch/mips/include/asm/mach-xxx to directory arch/mips/mach-xxx/include/mach Signed-off-by: bibo mao <maobibo@loongson.cn> --- arch/mips/Kconfig | 4 ++++ arch/mips/Makefile | 2 ++ arch/mips/include/asm/addrspace.h | 4 ++++ arch/mips/include/asm/cache.h | 4 ++++ arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/fixmap.h | 4 ++++ arch/mips/include/asm/floppy.h | 4 ++++ arch/mips/include/asm/i8259.h | 4 ++++ arch/mips/include/asm/ide.h | 6 ++++++ arch/mips/include/asm/io.h | 5 +++++ arch/mips/include/asm/irq.h | 4 ++++ arch/mips/include/asm/mc146818rtc.h | 4 ++++ arch/mips/include/asm/mmzone.h | 4 ++++ arch/mips/include/asm/page.h | 4 ++++ arch/mips/include/asm/topology.h | 4 ++++ arch/mips/include/asm/war.h | 4 ++++ arch/mips/kernel/head.S | 4 ++++ 17 files changed, 69 insertions(+)