xtensa: move headers files to arch/xtensa/include
Chris Zankel [Thu, 6 Nov 2008 14:40:46 +0000 (06:40 -0800)]
Move all header files for xtensa to arch/xtensa/include and platform and
variant header files to the appropriate arch/xtensa/platforms/ and
arch/xtensa/variants/ directories.

Moving the files gets also rid of all uses of symlinks in the Makefile.

This has been completed already for the majority of the architectures
and xtensa is one out of six missing.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Chris Zankel <chris@zankel.net>

120 files changed:
arch/xtensa/Makefile
arch/xtensa/boot/boot-elf/boot.lds.S
arch/xtensa/boot/boot-redboot/bootstrap.S
arch/xtensa/include/asm/Kbuild [moved from include/asm-xtensa/Kbuild with 100% similarity]
arch/xtensa/include/asm/asmmacro.h [moved from include/asm-xtensa/asmmacro.h with 98% similarity]
arch/xtensa/include/asm/atomic.h [moved from include/asm-xtensa/atomic.h with 100% similarity]
arch/xtensa/include/asm/auxvec.h [moved from include/asm-xtensa/auxvec.h with 100% similarity]
arch/xtensa/include/asm/bitops.h [moved from include/asm-xtensa/bitops.h with 100% similarity]
arch/xtensa/include/asm/bootparam.h [moved from include/asm-xtensa/bootparam.h with 100% similarity]
arch/xtensa/include/asm/bug.h [moved from include/asm-xtensa/bug.h with 100% similarity]
arch/xtensa/include/asm/bugs.h [moved from include/asm-xtensa/bugs.h with 100% similarity]
arch/xtensa/include/asm/byteorder.h [moved from include/asm-xtensa/byteorder.h with 100% similarity]
arch/xtensa/include/asm/cache.h [moved from include/asm-xtensa/cache.h with 96% similarity]
arch/xtensa/include/asm/cacheasm.h [moved from include/asm-xtensa/cacheasm.h with 100% similarity]
arch/xtensa/include/asm/cacheflush.h [moved from include/asm-xtensa/cacheflush.h with 100% similarity]
arch/xtensa/include/asm/checksum.h [moved from include/asm-xtensa/checksum.h with 99% similarity]
arch/xtensa/include/asm/coprocessor.h [moved from include/asm-xtensa/coprocessor.h with 98% similarity]
arch/xtensa/include/asm/cpumask.h [moved from include/asm-xtensa/cpumask.h with 100% similarity]
arch/xtensa/include/asm/cputime.h [moved from include/asm-xtensa/cputime.h with 100% similarity]
arch/xtensa/include/asm/current.h [moved from include/asm-xtensa/current.h with 100% similarity]
arch/xtensa/include/asm/delay.h [moved from include/asm-xtensa/delay.h with 100% similarity]
arch/xtensa/include/asm/device.h [moved from include/asm-xtensa/device.h with 100% similarity]
arch/xtensa/include/asm/div64.h [moved from include/asm-xtensa/div64.h with 100% similarity]
arch/xtensa/include/asm/dma-mapping.h [moved from include/asm-xtensa/dma-mapping.h with 100% similarity]
arch/xtensa/include/asm/dma.h [moved from include/asm-xtensa/dma.h with 100% similarity]
arch/xtensa/include/asm/elf.h [moved from include/asm-xtensa/elf.h with 100% similarity]
arch/xtensa/include/asm/emergency-restart.h [moved from include/asm-xtensa/emergency-restart.h with 100% similarity]
arch/xtensa/include/asm/errno.h [moved from include/asm-xtensa/errno.h with 100% similarity]
arch/xtensa/include/asm/fb.h [moved from include/asm-xtensa/fb.h with 100% similarity]
arch/xtensa/include/asm/fcntl.h [moved from include/asm-xtensa/fcntl.h with 100% similarity]
arch/xtensa/include/asm/futex.h [moved from include/asm-xtensa/futex.h with 100% similarity]
arch/xtensa/include/asm/hardirq.h [moved from include/asm-xtensa/hardirq.h with 100% similarity]
arch/xtensa/include/asm/highmem.h [moved from include/asm-xtensa/highmem.h with 100% similarity]
arch/xtensa/include/asm/hw_irq.h [moved from include/asm-xtensa/hw_irq.h with 100% similarity]
arch/xtensa/include/asm/io.h [moved from include/asm-xtensa/io.h with 100% similarity]
arch/xtensa/include/asm/ioctl.h [moved from include/asm-xtensa/ioctl.h with 100% similarity]
arch/xtensa/include/asm/ioctls.h [moved from include/asm-xtensa/ioctls.h with 100% similarity]
arch/xtensa/include/asm/ipcbuf.h [moved from include/asm-xtensa/ipcbuf.h with 100% similarity]
arch/xtensa/include/asm/irq.h [moved from include/asm-xtensa/irq.h with 89% similarity]
arch/xtensa/include/asm/irq_regs.h [moved from include/asm-xtensa/irq_regs.h with 100% similarity]
arch/xtensa/include/asm/kdebug.h [moved from include/asm-xtensa/kdebug.h with 100% similarity]
arch/xtensa/include/asm/kmap_types.h [moved from include/asm-xtensa/kmap_types.h with 100% similarity]
arch/xtensa/include/asm/linkage.h [moved from include/asm-xtensa/linkage.h with 100% similarity]
arch/xtensa/include/asm/local.h [moved from include/asm-xtensa/local.h with 100% similarity]
arch/xtensa/include/asm/mman.h [moved from include/asm-xtensa/mman.h with 100% similarity]
arch/xtensa/include/asm/mmu.h [moved from include/asm-xtensa/mmu.h with 100% similarity]
arch/xtensa/include/asm/mmu_context.h [moved from include/asm-xtensa/mmu_context.h with 100% similarity]
arch/xtensa/include/asm/module.h [moved from include/asm-xtensa/module.h with 100% similarity]
arch/xtensa/include/asm/msgbuf.h [moved from include/asm-xtensa/msgbuf.h with 100% similarity]
arch/xtensa/include/asm/mutex.h [moved from include/asm-xtensa/mutex.h with 100% similarity]
arch/xtensa/include/asm/page.h [moved from include/asm-xtensa/page.h with 100% similarity]
arch/xtensa/include/asm/param.h [moved from include/asm-xtensa/param.h with 100% similarity]
arch/xtensa/include/asm/pci-bridge.h [moved from include/asm-xtensa/pci-bridge.h with 100% similarity]
arch/xtensa/include/asm/pci.h [moved from include/asm-xtensa/pci.h with 100% similarity]
arch/xtensa/include/asm/percpu.h [moved from include/asm-xtensa/percpu.h with 100% similarity]
arch/xtensa/include/asm/pgalloc.h [moved from include/asm-xtensa/pgalloc.h with 100% similarity]
arch/xtensa/include/asm/pgtable.h [moved from include/asm-xtensa/pgtable.h with 100% similarity]
arch/xtensa/include/asm/platform.h [moved from include/asm-xtensa/platform.h with 98% similarity]
arch/xtensa/include/asm/poll.h [moved from include/asm-xtensa/poll.h with 100% similarity]
arch/xtensa/include/asm/posix_types.h [moved from include/asm-xtensa/posix_types.h with 100% similarity]
arch/xtensa/include/asm/processor.h [moved from include/asm-xtensa/processor.h with 99% similarity]
arch/xtensa/include/asm/ptrace.h [moved from include/asm-xtensa/ptrace.h with 99% similarity]
arch/xtensa/include/asm/regs.h [moved from include/asm-xtensa/regs.h with 100% similarity]
arch/xtensa/include/asm/resource.h [moved from include/asm-xtensa/resource.h with 100% similarity]
arch/xtensa/include/asm/rmap.h [moved from include/asm-xtensa/rmap.h with 100% similarity]
arch/xtensa/include/asm/rwsem.h [moved from include/asm-xtensa/rwsem.h with 100% similarity]
arch/xtensa/include/asm/scatterlist.h [moved from include/asm-xtensa/scatterlist.h with 100% similarity]
arch/xtensa/include/asm/sections.h [moved from include/asm-xtensa/sections.h with 100% similarity]
arch/xtensa/include/asm/segment.h [moved from include/asm-xtensa/segment.h with 100% similarity]
arch/xtensa/include/asm/sembuf.h [moved from include/asm-xtensa/sembuf.h with 100% similarity]
arch/xtensa/include/asm/serial.h [moved from include/asm-xtensa/serial.h with 92% similarity]
arch/xtensa/include/asm/setup.h [moved from include/asm-xtensa/setup.h with 100% similarity]
arch/xtensa/include/asm/shmbuf.h [moved from include/asm-xtensa/shmbuf.h with 100% similarity]
arch/xtensa/include/asm/shmparam.h [moved from include/asm-xtensa/shmparam.h with 100% similarity]
arch/xtensa/include/asm/sigcontext.h [moved from include/asm-xtensa/sigcontext.h with 100% similarity]
arch/xtensa/include/asm/siginfo.h [moved from include/asm-xtensa/siginfo.h with 100% similarity]
arch/xtensa/include/asm/signal.h [moved from include/asm-xtensa/signal.h with 100% similarity]
arch/xtensa/include/asm/smp.h [moved from include/asm-xtensa/smp.h with 100% similarity]
arch/xtensa/include/asm/socket.h [moved from include/asm-xtensa/socket.h with 100% similarity]
arch/xtensa/include/asm/sockios.h [moved from include/asm-xtensa/sockios.h with 100% similarity]
arch/xtensa/include/asm/spinlock.h [moved from include/asm-xtensa/spinlock.h with 100% similarity]
arch/xtensa/include/asm/stat.h [moved from include/asm-xtensa/stat.h with 100% similarity]
arch/xtensa/include/asm/statfs.h [moved from include/asm-xtensa/statfs.h with 100% similarity]
arch/xtensa/include/asm/string.h [moved from include/asm-xtensa/string.h with 100% similarity]
arch/xtensa/include/asm/syscall.h [moved from include/asm-xtensa/syscall.h with 100% similarity]
arch/xtensa/include/asm/system.h [moved from include/asm-xtensa/system.h with 100% similarity]
arch/xtensa/include/asm/termbits.h [moved from include/asm-xtensa/termbits.h with 100% similarity]
arch/xtensa/include/asm/termios.h [moved from include/asm-xtensa/termios.h with 100% similarity]
arch/xtensa/include/asm/thread_info.h [moved from include/asm-xtensa/thread_info.h with 100% similarity]
arch/xtensa/include/asm/timex.h [moved from include/asm-xtensa/timex.h with 100% similarity]
arch/xtensa/include/asm/tlb.h [moved from include/asm-xtensa/tlb.h with 100% similarity]
arch/xtensa/include/asm/tlbflush.h [moved from include/asm-xtensa/tlbflush.h with 100% similarity]
arch/xtensa/include/asm/topology.h [moved from include/asm-xtensa/topology.h with 100% similarity]
arch/xtensa/include/asm/types.h [moved from include/asm-xtensa/types.h with 100% similarity]
arch/xtensa/include/asm/uaccess.h [moved from include/asm-xtensa/uaccess.h with 100% similarity]
arch/xtensa/include/asm/ucontext.h [moved from include/asm-xtensa/ucontext.h with 100% similarity]
arch/xtensa/include/asm/unaligned.h [moved from include/asm-xtensa/unaligned.h with 100% similarity]
arch/xtensa/include/asm/unistd.h [moved from include/asm-xtensa/unistd.h with 100% similarity]
arch/xtensa/include/asm/user.h [moved from include/asm-xtensa/user.h with 100% similarity]
arch/xtensa/include/asm/vga.h [moved from include/asm-xtensa/vga.h with 100% similarity]
arch/xtensa/include/asm/xor.h [moved from include/asm-xtensa/xor.h with 100% similarity]
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/vmlinux.lds.S
arch/xtensa/lib/checksum.S
arch/xtensa/lib/memcopy.S
arch/xtensa/lib/memset.S
arch/xtensa/lib/strncpy_user.S
arch/xtensa/lib/strnlen_user.S
arch/xtensa/lib/usercopy.S
arch/xtensa/platforms/iss/console.c
arch/xtensa/platforms/iss/include/platform/hardware.h [moved from include/asm-xtensa/platform-iss/hardware.h with 100% similarity]
arch/xtensa/platforms/iss/include/platform/simcall.h [moved from include/asm-xtensa/platform-iss/simcall.h with 100% similarity]
arch/xtensa/platforms/iss/io.c
arch/xtensa/platforms/iss/network.c
arch/xtensa/variants/dc232b/include/variant/core.h [moved from include/asm-xtensa/variant-dc232b/core.h with 100% similarity]
arch/xtensa/variants/dc232b/include/variant/tie-asm.h [moved from include/asm-xtensa/variant-dc232b/tie-asm.h with 100% similarity]
arch/xtensa/variants/dc232b/include/variant/tie.h [moved from include/asm-xtensa/variant-dc232b/tie.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/core.h [moved from include/asm-xtensa/variant-fsf/core.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/tie-asm.h [moved from include/asm-xtensa/variant-fsf/tie-asm.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/tie.h [moved from include/asm-xtensa/variant-fsf/tie.h with 100% similarity]

index 015b6b2..1da55fe 100644 (file)
@@ -33,6 +33,15 @@ KBUILD_CFLAGS += -ffreestanding
 
 KBUILD_CFLAGS += -pipe -mlongcalls
 
+vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
+plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
+
+ifeq ($(KBUILD_SRC),)
+KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs))
+else
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))
+endif
+
 KBUILD_DEFCONFIG := iss_defconfig
 
 # ramdisk/initrd support
@@ -66,21 +75,6 @@ libs-y               += arch/xtensa/lib/ $(LIBGCC)
 
 boot           := arch/xtensa/boot
 
-archinc                := include/asm-xtensa
-
-archprepare: $(archinc)/.platform
-
-# Update processor variant and platform symlinks if something which affects
-# them changed.
-
-$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
-       @echo '  SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
-       $(Q)mkdir -p $(archinc)
-       $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
-       @echo '  SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
-       $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
-       @touch $@
-
 
 all: zImage
 
@@ -89,10 +83,6 @@ bzImage : zImage
 zImage zImage.initrd: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-CLEAN_FILES    += arch/xtensa/vmlinux.lds                      \
-                  $(archinc)/platform $(archinc)/variant       \
-                  $(archinc)/.platform
-
 define archhelp
   @echo '* zImage      - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
 endef
index 849dfca..4e53b74 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_ResetVector)
 
index 8484812..5582e8c 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <asm/regs.h>
 #include <asm/asmmacro.h>
 #include <asm/cacheasm.h>
similarity index 98%
rename from include/asm-xtensa/asmmacro.h
rename to arch/xtensa/include/asm/asmmacro.h
index 76915ca..755320f 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_ASMMACRO_H
 #define _XTENSA_ASMMACRO_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * Some little helpers for loops. Use zero-overhead-loops
similarity index 96%
rename from include/asm-xtensa/cache.h
rename to arch/xtensa/include/asm/cache.h
index 3bba2a5..f04c989 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_CACHE_H
 #define _XTENSA_CACHE_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 #define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH
 #define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE
similarity index 99%
rename from include/asm-xtensa/checksum.h
rename to arch/xtensa/include/asm/checksum.h
index 23534c6..f84d3f0 100644 (file)
@@ -12,7 +12,7 @@
 #define _XTENSA_CHECKSUM_H
 
 #include <linux/in6.h>
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * computes the checksum of a memory block at buff, length len,
similarity index 98%
rename from include/asm-xtensa/coprocessor.h
rename to arch/xtensa/include/asm/coprocessor.h
index 1cbcf90..65a285d 100644 (file)
 #define _XTENSA_COPROCESSOR_H
 
 #include <linux/stringify.h>
-#include <asm/variant/tie.h>
+#include <variant/tie.h>
 #include <asm/types.h>
 
 #ifdef __ASSEMBLY__
-# include <asm/variant/tie-asm.h>
+# include <variant/tie-asm.h>
 
 .macro xchal_sa_start  a b
        .set .Lxchal_pofs_, 0
similarity index 89%
rename from include/asm-xtensa/irq.h
rename to arch/xtensa/include/asm/irq.h
index fc73b7f..1620d1e 100644 (file)
@@ -11,8 +11,8 @@
 #ifndef _XTENSA_IRQ_H
 #define _XTENSA_IRQ_H
 
-#include <asm/platform/hardware.h>
-#include <asm/variant/core.h>
+#include <platform/hardware.h>
+#include <variant/core.h>
 
 #ifndef PLATFORM_NR_IRQS
 # define PLATFORM_NR_IRQS 0
similarity index 98%
rename from include/asm-xtensa/platform.h
rename to arch/xtensa/include/asm/platform.h
index 48135a9..e3d5a48 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * include/asm-xtensa/platform.h
- *
  * Platform specific functions
  *
  * This file is subject to the terms and conditions of the GNU General
similarity index 99%
rename from include/asm-xtensa/processor.h
rename to arch/xtensa/include/asm/processor.h
index 4918a4e..07387d3 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_PROCESSOR_H
 #define _XTENSA_PROCESSOR_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <asm/coprocessor.h>
 
 #include <linux/compiler.h>
similarity index 99%
rename from include/asm-xtensa/ptrace.h
rename to arch/xtensa/include/asm/ptrace.h
index 089b0db..905e1e6 100644 (file)
@@ -111,7 +111,7 @@ struct pt_regs {
        unsigned long areg[16];         /* 128 (64) */
 };
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 # define task_pt_regs(tsk) ((struct pt_regs*) \
   (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
similarity index 92%
rename from include/asm-xtensa/serial.h
rename to arch/xtensa/include/asm/serial.h
index ec04114..a8a2493 100644 (file)
@@ -13,6 +13,6 @@
 #ifndef _XTENSA_SERIAL_H
 #define _XTENSA_SERIAL_H
 
-#include <asm/platform/serial.h>
+#include <platform/serial.h>
 
 #endif /* _XTENSA_SERIAL_H */
index dfd35dc..a51d36a 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/page.h>
 #include <asm/signal.h>
 #include <asm/tlbflush.h>
-#include <asm/variant/tie-asm.h>
+#include <variant/tie-asm.h>
 
 /* Unimplemented features. */
 
index 51f4fb6..d506774 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm-generic/vmlinux.lds.h>
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_start)
 
index 9d9cd99..df397f9 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm/errno.h>
 #include <linux/linkage.h>
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * computes a partial checksum, e.g. for TCP/UDP fragments
index ddda8f4..ea59dcd 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2002 - 2005 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
        .macro  src_b   r, w0, w1
 #ifdef __XTENSA_EB__
index 56a1749..10b8c40 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * void *memset(void *dst, int c, size_t length)
index b2655d9..9f603cd 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <linux/errno.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
index ad3f616..23f2a89 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
 
index a8ab1d4..46d6031 100644 (file)
@@ -53,7 +53,7 @@
  *     a11/ original length
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 #ifdef __XTENSA_EB__
 #define ALIGN(R, W0, W1) src   R, W0, W1
index 9141e36..c5e5cf9 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/irq.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/platform-iss/simcall.h>
 
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
index 5b161a5..571d0b2 100644 (file)
@@ -3,7 +3,7 @@
 #if 0
 
 #include <asm/io.h>
-#include <xtensa/simcall.h>
+#include <platform/platform-iss/simcall.h>
 
 extern int __simc ();
 
index 11a20ad..79bab34 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/rtnetlink.h>
 #include <linux/platform_device.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/platform-iss/simcall.h>
 
 #define DRIVER_NAME "iss-netdev"
 #define ETH_MAX_PACKET 1500