diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-26 14:40:46 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-07 17:04:06 -0500 |
| commit | 006fa2599bf0daf107cbb7a8a99fcfb9a998a169 (patch) | |
| tree | ec9a6d2af74aa4a923fa4ee23d13aac5ab780f4b /arch | |
| parent | b3634575930857724d5c3987a2739b0637999b4e (diff) | |
ARM: fix noMMU kallsyms symbol filtering
With noMMU, CONFIG_PAGE_OFFSET was not being set correctly. As there's
no MMU, PAGE_OFFSET should be equal to PHYS_OFFSET in all cases. This
commit makes that explicit.
Since we do this, we don't need to mess around in asm/memory.h with
ifdefs to sort this out, so let's get rid of that, and there's no point
offering the "Memory split" option for noMMU as that's meaningless
there.
Fixes: b9b32bf70f2f ("ARM: use linker magic for vectors and vector stubs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/Kconfig | 2 | ||||
| -rw-r--r-- | arch/arm/include/asm/memory.h | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e25419817791..2a232ce56d9c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1578,6 +1578,7 @@ config BL_SWITCHER_DUMMY_IF | |||
| 1578 | 1578 | ||
| 1579 | choice | 1579 | choice |
| 1580 | prompt "Memory split" | 1580 | prompt "Memory split" |
| 1581 | depends on MMU | ||
| 1581 | default VMSPLIT_3G | 1582 | default VMSPLIT_3G |
| 1582 | help | 1583 | help |
| 1583 | Select the desired split between kernel and user memory. | 1584 | Select the desired split between kernel and user memory. |
| @@ -1595,6 +1596,7 @@ endchoice | |||
| 1595 | 1596 | ||
| 1596 | config PAGE_OFFSET | 1597 | config PAGE_OFFSET |
| 1597 | hex | 1598 | hex |
| 1599 | default PHYS_OFFSET if !MMU | ||
| 1598 | default 0x40000000 if VMSPLIT_1G | 1600 | default 0x40000000 if VMSPLIT_1G |
| 1599 | default 0x80000000 if VMSPLIT_2G | 1601 | default 0x80000000 if VMSPLIT_2G |
| 1600 | default 0xC0000000 | 1602 | default 0xC0000000 |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 8756e4bcdba0..4afb376d9c7c 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
| @@ -30,14 +30,15 @@ | |||
| 30 | */ | 30 | */ |
| 31 | #define UL(x) _AC(x, UL) | 31 | #define UL(x) _AC(x, UL) |
| 32 | 32 | ||
| 33 | /* PAGE_OFFSET - the virtual address of the start of the kernel image */ | ||
| 34 | #define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET) | ||
| 35 | |||
| 33 | #ifdef CONFIG_MMU | 36 | #ifdef CONFIG_MMU |
| 34 | 37 | ||
| 35 | /* | 38 | /* |
| 36 | * PAGE_OFFSET - the virtual address of the start of the kernel image | ||
| 37 | * TASK_SIZE - the maximum size of a user space task. | 39 | * TASK_SIZE - the maximum size of a user space task. |
| 38 | * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area | 40 | * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area |
| 39 | */ | 41 | */ |
| 40 | #define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET) | ||
| 41 | #define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M)) | 42 | #define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M)) |
| 42 | #define TASK_UNMAPPED_BASE ALIGN(TASK_SIZE / 3, SZ_16M) | 43 | #define TASK_UNMAPPED_BASE ALIGN(TASK_SIZE / 3, SZ_16M) |
| 43 | 44 | ||
| @@ -104,10 +105,6 @@ | |||
| 104 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) | 105 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) |
| 105 | #endif | 106 | #endif |
| 106 | 107 | ||
| 107 | #ifndef PAGE_OFFSET | ||
| 108 | #define PAGE_OFFSET PLAT_PHYS_OFFSET | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /* | 108 | /* |
| 112 | * The module can be at any place in ram in nommu mode. | 109 | * The module can be at any place in ram in nommu mode. |
| 113 | */ | 110 | */ |
