Skip to content

Commit d2ca5f2

Browse files
afzalmamRussell King
authored andcommitted
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>
1 parent 035e787 commit d2ca5f2

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎arch/arm/include/asm/memory.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111

112112
#endif /* !CONFIG_MMU */
113113

114+
#define VECTORS_BASE UL(0xffff0000)
115+
114116
#ifdef CONFIG_XIP_KERNEL
115117
#define KERNEL_START _sdata
116118
#else

‎arch/arm/mach-berlin/platsmp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <asm/cacheflush.h>
1717
#include <asm/cp15.h>
18+
#include <asm/memory.h>
1819
#include <asm/smp_plat.h>
1920
#include <asm/smp_scu.h>
2021

@@ -75,7 +76,7 @@ static void __init berlin_smp_prepare_cpus(unsigned int max_cpus)
7576
if (!cpu_ctrl)
7677
goto unmap_scu;
7778

78-
vectors_base = ioremap(CONFIG_VECTORS_BASE, SZ_32K);
79+
vectors_base = ioremap(VECTORS_BASE, SZ_32K);
7980
if (!vectors_base)
8081
goto unmap_scu;
8182

‎arch/arm/mm/dump.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/seq_file.h>
1919

2020
#include <asm/fixmap.h>
21+
#include <asm/memory.h>
2122
#include <asm/pgtable.h>
2223

2324
struct addr_marker {
@@ -31,8 +32,8 @@ static struct addr_marker address_markers[] = {
3132
{ 0, "vmalloc() Area" },
3233
{ VMALLOC_END, "vmalloc() End" },
3334
{ FIXADDR_START, "Fixmap Area" },
34-
{ CONFIG_VECTORS_BASE, "Vectors" },
35-
{ CONFIG_VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" },
35+
{ VECTORS_BASE, "Vectors" },
36+
{ VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" },
3637
{ -1, NULL },
3738
};
3839

‎arch/arm/mm/init.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <asm/cp15.h>
2828
#include <asm/mach-types.h>
2929
#include <asm/memblock.h>
30+
#include <asm/memory.h>
3031
#include <asm/prom.h>
3132
#include <asm/sections.h>
3233
#include <asm/setup.h>
@@ -518,8 +519,7 @@ void __init mem_init(void)
518519
" .data : 0x%p" " - 0x%p" " (%4td kB)\n"
519520
" .bss : 0x%p" " - 0x%p" " (%4td kB)\n",
520521

521-
MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) +
522-
(PAGE_SIZE)),
522+
MLK(VECTORS_BASE, VECTORS_BASE + PAGE_SIZE),
523523
#ifdef CONFIG_HAVE_TCM
524524
MLK(DTCM_OFFSET, (unsigned long) dtcm_end),
525525
MLK(ITCM_OFFSET, (unsigned long) itcm_end),

0 commit comments

Comments
 (0)