xtensa: move headers files to arch/xtensa/include
PATCH 1/1 xtensa: move headers files to arch/xtensa/include
Hi Chris.
Following is an untested receipe to move all header files for xtensa to arch/xtensa/include.
As well as moving the files it gets rid of all uses of symlinks in the Makefile.
We have done so already for the majority of the architectures and xtensa is one out of six missing.
Please consider applying and submitting to Linus ASAP. Linus will most likely accept such a patch even this late to get all arches moved over to use arch/$ARCH/include.
You can add:
to the final commit.
Or you can ask Linus to execute the follwing steps if you do not have a git tree handy.
Sam
Step 1) - execute the following script:
#!/bin/sh
set -e
mkdir -p arch/xtensa/include/asm
mkdir -p arch/xtensa/include/variant-dc232b/variant mkdir -p arch/xtensa/include/variant-fsf/variant mkdir -p arch/xtensa/include/platform-iss
git mv include/asm-xtensa/variant-dc232b/* arch/xtensa/include/variant-dc232b/variant rmdir include/asm-xtensa/variant-dc232b
git mv include/asm-xtensa/variant-fsf/* arch/xtensa/include/variant-fsf/variant
rmdir include/asm-xtensa/variant-fsf
git mv include/asm-xtensa/platform-iss/* arch/xtensa/include/platform-iss rmdir include/asm-xtensa/platform-iss
git mv include/asm-xtensa/* arch/xtensa/include/asm rmdir include/asm-xtensa
Step 2) apply the following patch
arch/xtensa/Makefile +2 -19
@@ -32,6 +32,8 @@ export PLATFORM KBUILD_CFLAGS += -ffreestanding KBUILD_CFLAGS += -pipe -mlongcalls +KBUILD_CFLAGS += -Iarch/xtensa/include/platform-$(platform-y) +KBUILD_CFLAGS += -Iarch/xtensa/include/variant-$(variant-y) KBUILD_DEFCONFIG := iss_defconfig
@@ -66,21 +68,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 +76,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
arch/xtensa/boot/boot-elf/boot.lds.S +1 -1
@@ -1,4 +1,4 @@ -#include <asm/variant/core.h> +#include <variant/core.h> OUTPUT_ARCH(xtensa) ENTRY(_ResetVector)
arch/xtensa/boot/boot-redboot/bootstrap.S +1 -1
@@ -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>
arch/xtensa/kernel/entry.S +1 -1
@@ -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. */
arch/xtensa/kernel/vmlinux.lds.S +1 -1
@@ -16,7 +16,7 @@ #include <asm-generic/vmlinux.lds.h> -#include <asm/variant/core.h> +#include <variant/core.h> OUTPUT_ARCH(xtensa) ENTRY(_start)
arch/xtensa/lib/checksum.S +1 -1
@@ -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
arch/xtensa/lib/memcopy.S +1 -1
@@ -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__
arch/xtensa/lib/memset.S +1 -1
@@ -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)
arch/xtensa/lib/strncpy_user.S +1 -1
@@ -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. */
arch/xtensa/lib/strnlen_user.S +1 -1
@@ -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. */
arch/xtensa/lib/usercopy.S +1 -1
@@ -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
arch/xtensa/platforms/iss/console.c +1 -1
@@ -24,7 +24,7 @@#include <asm/uaccess.h> #include <asm/irq.h> -#include <asm/platform/simcall.h> +#include <platform-iss/simcall.h> #include <linux/tty.h> #include <linux/tty_flip.h>
arch/xtensa/platforms/iss/io.c +1 -1
@@ -3,7 +3,7 @@#if 0 #include <asm/io.h> -#include <xtensa/simcall.h> +#include <platform-iss/simcall.h> extern int __simc ();
arch/xtensa/platforms/iss/network.c +1 -1
@@ -33,7 +33,7 @@#include <linux/rtnetlink.h> #include <linux/platform_device.h> -#include <asm/platform/simcall.h> +#include <platform-iss/simcall.h> #define DRIVER_NAME "iss-netdev"#define ETH_MAX_PACKET 1500
Quoted 4 lines · Sam Ravnborg
Hi Chris.
Following is an untested receipe to move all header files for xtensa to
arch/xtensa/include.
I took a second look at this and realised that I had to update the header files located in include/asm-xtensa too with some minimal patch updates.
And doing so I realised that irq.h has a reference to a platform specific file so we need to add an extra directory level for platform as we already do for variant.
So it will now look like this:arch/xtensa/include/platform-iss/platform/*
Not a big deal to fix up but it will not be until tomorrow. Feel free to beat me on it..
Sam