GIT 0452152158a06ff5e0f7d2ce511b6620985f6f0e git+ssh://master.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6.git#testing 0452152158a06ff5e0f7d2ce511b6620985f6f0e commit 0452152158a06ff5e0f7d2ce511b6620985f6f0e Author: Johannes Weiner Date: Thu Mar 13 11:45:29 2008 -0700 xtensa: remove redundant display of free swap space in show_mem() Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Chris Zankel commit 62cb119249e9134f382cf5dc1ec64586b104ad0f Author: Chris Zankel Date: Tue Mar 11 13:59:27 2008 -0700 [XTENSA] More fixes to the build system The platform and processor variant included a trailing space, and the default configuration was missing a configuration option. Signed-off-by: Chris Zankel commit d2ff99e0ef0861cf93b599966cbb06e8b833e113 Author: Chris Zankel Date: Tue Feb 19 10:46:44 2008 -0800 [XTENSA] Fix cross-compiler prefix and cleanup The previous patch expected a specific tripplet for cross compilation: xtensa_-linux-{gnu|uclibc}- and didn't allow the more commong tripplet: xtensa-linux-{gnu|uclibc}-. Also, remove some ancient ramdisk support that has since been integrated into common sources. Signed-off-by: Chris Zankel commit 40e5b80832994938b7909cdcb97014b26369e8a3 Author: Chris Zankel Date: Wed Feb 13 10:47:26 2008 -0800 [XTENSA] Prompt for Xtensa cpu variant name when custom variant selected Among list of supported Xtensa cpu variants is the entry 'custom'. When this is selected, prompt further for the custom variant name. This allows multiple variants to be added in include/asm-xtensa/variant- without other kernel changes. Also make cross-compilation check a bit more consistent with other arches. Should no longer be necessary to specify CROSS_COMPILE on make cmdline. Signed-off-by: Marc Gauthier Signed-off-by: Chris Zankel arch/xtensa/Kconfig | 65 ++++++++++++++++++++++++----------- arch/xtensa/Makefile | 68 +++++++++++++----------------------- arch/xtensa/boot/ramdisk/Makefile | 23 ------------ arch/xtensa/configs/iss_defconfig | 2 + arch/xtensa/mm/init.c | 1 - 5 files changed, 71 insertions(+), 88 deletions(-) diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 9fc8551..1593125 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -20,8 +20,8 @@ config XTENSA primarily for embedded systems. These processors are both configurable and extensible. The Linux port to the Xtensa architecture supports all processor configurations and extensions, - with reasonable minimum requirements. The Xtensa Linux project has - a home page at . + with reasonable minimum requirements. The Xtensa Linux project + has a home page at . config RWSEM_XCHGADD_ALGORITHM bool @@ -63,15 +63,37 @@ choice default XTENSA_VARIANT_FSF config XTENSA_VARIANT_FSF - bool "fsf" + bool "fsf - default (not generic) configuration" + +config XTENSA_VARIANT_CUSTOM + bool "Custom Xtensa processor configuration" + help + Select this variant to use a custom Xtensa processor configuration. + You will be prompted for a processor variant name. + endchoice +config XTENSA_VARIANT_CUSTOM_NAME + string "Xtensa Processor Custom Variant Name" + depends on XTENSA_VARIANT_CUSTOM + default "" + help + Provide the name of a custom Xtensa processor variant. + The name should match what was provided to the overlay generation + script. This same NAME selects include/asm-xtensa/variant-NAME + and the xtensa_NAME prefix for the toolchain. + +config XTENSA_VARIANT_NAME + string + default "fsf" if XTENSA_VARIANT_FSF + default XTENSA_VARIANT_CUSTOM_NAME if XTENSA_VARIANT_CUSTOM + config MMU bool default y config XTENSA_UNALIGNED_USER - bool "Unaligned memory access in use space" + bool "Unaligned memory access in user space" ---help--- The Xtensa architecture currently does not handle unaligned memory accesses in hardware but through an exception handler. @@ -119,8 +141,26 @@ config XTENSA_PLATFORM_XT2000 XT2000 is the name of Tensilica's feature-rich emulation platform. This hardware is capable of running a full Linux distribution. +config XTENSA_PLATFORM_CUSTOM + bool "Custom Xtensa platform" + help + Select this variant to use a custom platform. + You will be prompted for a platform name. + endchoice +config XTENSA_PLATFORM_CUSTOM_NAME + string "Custom Platform Name" + depends on XTENSA_PLATFORM_CUSTOM + default "" + help + Provide the name of a custom platform. + +config XTENSA_PLATFORM_NAME + string + default "iss" if XTENSA_PLATFORM_ISS + default XTENSA_PLATFORM_CUSTOM_NAME if XTENSA_PLATFORM_CUSTOM + config XTENSA_CALIBRATE_CCOUNT bool "Auto calibration of the CPU clock rate" @@ -234,23 +274,6 @@ source "drivers/Kconfig" source "fs/Kconfig" -menu "Xtensa initrd options" - depends on BLK_DEV_INITRD - - config EMBEDDED_RAMDISK - bool "Embed root filesystem ramdisk into the kernel" - -config EMBEDDED_RAMDISK_IMAGE - string "Filename of gzipped ramdisk image" - depends on EMBEDDED_RAMDISK - default "ramdisk.gz" - help - This is the filename of the ramdisk image to be built into the - kernel. Relative pathnames are relative to arch/xtensa/boot/ramdisk/. - The ramdisk image is not part of the kernel distribution; you must - provide one yourself. -endmenu - source "arch/xtensa/Kconfig.debug" source "security/Kconfig" diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 4bd1e14..56b7149 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -3,29 +3,19 @@ # License. See the file "COPYING" in the main directory of this archive # for more details. # -# Copyright (C) 2001 - 2005 Tensilica Inc. +# Copyright (C) 2001 - 2008 Tensilica Inc. # # This file is included by the global makefile so that you can add your own # architecture-specific flags and dependencies. Remember to do have actions # for "archclean" and "archdep" for cleaning up and making dependencies for # this architecture -# Core configuration. -# (Use VAR= to use another default compiler.) +# Core and platform configurations -variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf -variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom +variant-y := $(strip $(subst ",,$(CONFIG_XTENSA_VARIANT_NAME)))#"))) +platform-y := $(strip $(subst ",,$(CONFIG_XTENSA_PLATFORM_NAME)))#"))) -VARIANT = $(variant-y) -export VARIANT - -# Platform configuration - -platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 -platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss - -PLATFORM = $(platform-y) -export PLATFORM +UTS_MACHINE := xtensa_$(variant-y) # temporarily until string.h is fixed KBUILD_CFLAGS += -ffreestanding @@ -34,53 +24,45 @@ KBUILD_CFLAGS += -pipe -mlongcalls KBUILD_DEFCONFIG := iss_defconfig -# ramdisk/initrd support -# You need a compressed ramdisk image, named ramdisk.gz in -# arch/xtensa/boot/ramdisk - -core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ - -# Test for cross compiling +# Test for cross compiling. Allow xtensa-*-* and xtensa_-*-* -ifneq ($(VARIANT),) - COMPILE_ARCH = $(shell uname -m) - - ifneq ($(COMPILE_ARCH), xtensa) - ifndef CROSS_COMPILE - CROSS_COMPILE = xtensa_$(VARIANT)- - endif +ifneq ($(SUBARCH),$(ARCH)) + ifeq ($(CROSS_COMPILE),) + CROSS_COMPILE := $(call cc-cross-prefix, \ + xtensa-linux-uclibc- xtensa_$(variant-y)-linux-uclibc- \ + xtensa-linux-gnu- xtensa_$(variant-y)-linux-gnu-) endif endif -# +# We need to have a 'variant' configured, so exclude this line for +# make config/clean/etc. +ifneq ($(variant-y),) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) +endif head-y := arch/xtensa/kernel/head.o core-y += arch/xtensa/kernel/ arch/xtensa/mm/ -ifneq ($(PLATFORM),) -core-y += arch/xtensa/platforms/$(PLATFORM)/ +ifneq ($(platform-y),) +core-y += arch/xtensa/platforms/$(platform-y)/ endif libs-y += arch/xtensa/lib/ $(LIBGCC) boot := arch/xtensa/boot - archinc := include/asm-xtensa -archprepare: $(archinc)/.platform +archprepare: $(archinc)/.configured -# Update processor variant and platform symlinks if something which affects -# them changed. +# 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)' +$(archinc)/.configured: $(wildcard include/config/arch/*.h) include/config/auto.conf + @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(variant-y)' $(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 + $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(variant-y) $(archinc)/variant + @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(platform-y)' + $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(platform-y) $(archinc)/platform @touch $@ - all: zImage bzImage : zImage @@ -90,7 +72,7 @@ zImage zImage.initrd: vmlinux CLEAN_FILES += arch/xtensa/vmlinux.lds \ $(archinc)/platform $(archinc)/variant \ - $(archinc)/.platform + $(archinc)/.configured define archhelp @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' diff --git a/arch/xtensa/boot/ramdisk/Makefile b/arch/xtensa/boot/ramdisk/Makefile deleted file mode 100644 index b12f763..0000000 --- a/arch/xtensa/boot/ramdisk/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# -# Makefile for a ramdisk image -# - -BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big) - -ifeq ($(BIG_ENDIAN),1) -OBJCOPY_ARGS := -O elf32-xtensa-be -else -OBJCOPY_ARGS := -O elf32-xtensa-le -endif - -obj-y = ramdisk.o - -RAMDISK_IMAGE = arch/$(ARCH)/boot/ramdisk/$(CONFIG_EMBEDDED_RAMDISK_IMAGE) - -arch/$(ARCH)/boot/ramdisk/ramdisk.o: - $(Q)echo -e "dummy:" | $(AS) -o $@; - $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) \ - --add-section .initrd=$(RAMDISK_IMAGE) \ - --set-section-flags .initrd=contents,alloc,load,load,data \ - arch/$(ARCH)/boot/ramdisk/ramdisk.o $@ - diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig index f198540..68f7631 100644 --- a/arch/xtensa/configs/iss_defconfig +++ b/arch/xtensa/configs/iss_defconfig @@ -54,6 +54,7 @@ CONFIG_CC_ALIGN_JUMPS=0 # Processor type and features # CONFIG_XTENSA_VARIANT_FSF=y +CONFIG_XTENSA_VARIANT_NAME="iss" CONFIG_MMU=y # CONFIG_XTENSA_UNALIGNED_USER is not set # CONFIG_PREEMPT is not set @@ -67,6 +68,7 @@ CONFIG_XTENSA_PLATFORM_ISS=y # CONFIG_XTENSA_PLATFORM_XT2000 is not set # CONFIG_XTENSA_PLATFORM_ARUBA is not set # CONFIG_XTENSA_CALIBRATE_CCOUNT is not set +CONFIG_XTENSA_PLATFORM_NAME="iss" CONFIG_XTENSA_CPU_CLOCK=10 # CONFIG_GENERIC_CALIBRATE_DELAY is not set CONFIG_CMDLINE_BOOL=y diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 81d0560..323b548 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -287,7 +287,6 @@ void show_mem(void) printk("Mem-info:\n"); show_free_areas(); - printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); i = max_mapnr; while (i-- > 0) { total++;