From: Max Filippov Date: Thu, 4 Aug 2016 12:45:32 +0000 (+0300) Subject: xtensa: fix default kernel load address X-Git-Tag: v4.9-rc1~118^2~14 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=73a3eed0a4800cbe9d99cc6447fed8309d7fcb97;p=uclinux-h8%2Flinux.git xtensa: fix default kernel load address Make default kernel load address 0xd0003000 for MMUv2 cores and 0x60003000 for noMMU cores. Don't initialize MMU inside vmlinux for predefined MMUv2 cores (it's noop anyway). This fixes the following defconfig build error: arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x99a): dangerous relocation: j: cannot encode: _WindowUnderflow12 arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x99d): dangerous relocation: j: cannot encode: _WindowUnderflow8 arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x9a0): dangerous relocation: j: cannot encode: _WindowUnderflow4 arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23a3): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23c1): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23dd): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) With this change all xtensa defconfigs build correctly. Reported-by: Guenter Roeck Signed-off-by: Max Filippov --- diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 3f6659c53023..4a866aaed67a 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -212,7 +212,7 @@ config HOTPLUG_CPU config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX bool "Initialize Xtensa MMU inside the Linux kernel code" - default y + default y if XTENSA_VARIANT_DC233C || XTENSA_VARIANT_CUSTOM help Earlier version initialized the MMU in the exception vector before jumping to _startup in head.S and had an advantage that @@ -254,7 +254,9 @@ config KSEG_PADDR config KERNEL_LOAD_ADDRESS hex "Kernel load address" - default 0x00003000 + default 0x60003000 if !MMU + default 0x00003000 if MMU && INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX + default 0xd0003000 if MMU && !INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX help This is the address where the kernel is loaded. It is virtual address for MMUv2 configurations and physical address