Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 8646/1: mmu: decouple VECTORS_BASE from Kconfig

For MMU configurations, VECTORS_BASE is always 0xffff0000, a macro
definition will suffice.

For no-MMU, exception base address is dynamically determined in
subsequent patches. To preserve bisectability, now make the
macro applicable for no-MMU scenario too.

Thanks to 0-DAY kernel test infrastructure that found the
bisectability issue. This macro will be restricted to MMU case upon
dynamically determining exception base address for no-MMU.

Once exception address is handled dynamically for no-MMU,
VECTORS_BASE can be removed from Kconfig.

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Afzal Mohammed and committed by
Russell King
d2ca5f24 035e7875

+9 -5
+2
arch/arm/include/asm/memory.h
··· 111 111 112 112 #endif /* !CONFIG_MMU */ 113 113 114 + #define VECTORS_BASE UL(0xffff0000) 115 + 114 116 #ifdef CONFIG_XIP_KERNEL 115 117 #define KERNEL_START _sdata 116 118 #else
+2 -1
arch/arm/mach-berlin/platsmp.c
··· 15 15 16 16 #include <asm/cacheflush.h> 17 17 #include <asm/cp15.h> 18 + #include <asm/memory.h> 18 19 #include <asm/smp_plat.h> 19 20 #include <asm/smp_scu.h> 20 21 ··· 76 75 if (!cpu_ctrl) 77 76 goto unmap_scu; 78 77 79 - vectors_base = ioremap(CONFIG_VECTORS_BASE, SZ_32K); 78 + vectors_base = ioremap(VECTORS_BASE, SZ_32K); 80 79 if (!vectors_base) 81 80 goto unmap_scu; 82 81
+3 -2
arch/arm/mm/dump.c
··· 18 18 #include <linux/seq_file.h> 19 19 20 20 #include <asm/fixmap.h> 21 + #include <asm/memory.h> 21 22 #include <asm/pgtable.h> 22 23 23 24 struct addr_marker { ··· 32 31 { 0, "vmalloc() Area" }, 33 32 { VMALLOC_END, "vmalloc() End" }, 34 33 { FIXADDR_START, "Fixmap Area" }, 35 - { CONFIG_VECTORS_BASE, "Vectors" }, 36 - { CONFIG_VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" }, 34 + { VECTORS_BASE, "Vectors" }, 35 + { VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" }, 37 36 { -1, NULL }, 38 37 }; 39 38
+2 -2
arch/arm/mm/init.c
··· 27 27 #include <asm/cp15.h> 28 28 #include <asm/mach-types.h> 29 29 #include <asm/memblock.h> 30 + #include <asm/memory.h> 30 31 #include <asm/prom.h> 31 32 #include <asm/sections.h> 32 33 #include <asm/setup.h> ··· 519 518 " .data : 0x%p" " - 0x%p" " (%4td kB)\n" 520 519 " .bss : 0x%p" " - 0x%p" " (%4td kB)\n", 521 520 522 - MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + 523 - (PAGE_SIZE)), 521 + MLK(VECTORS_BASE, VECTORS_BASE + PAGE_SIZE), 524 522 #ifdef CONFIG_HAVE_TCM 525 523 MLK(DTCM_OFFSET, (unsigned long) dtcm_end), 526 524 MLK(ITCM_OFFSET, (unsigned long) itcm_end),