Skip to content

Commit 006fa25

Browse files
author
Russell King
committed
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: b9b32bf ("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>
1 parent b363457 commit 006fa25

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎arch/arm/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,7 @@ config BL_SWITCHER_DUMMY_IF
15781578

15791579
choice
15801580
prompt "Memory split"
1581+
depends on MMU
15811582
default VMSPLIT_3G
15821583
help
15831584
Select the desired split between kernel and user memory.
@@ -1595,6 +1596,7 @@ endchoice
15951596

15961597
config PAGE_OFFSET
15971598
hex
1599+
default PHYS_OFFSET if !MMU
15981600
default 0x40000000 if VMSPLIT_1G
15991601
default 0x80000000 if VMSPLIT_2G
16001602
default 0xC0000000

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
*/
3131
#define UL(x) _AC(x, UL)
3232

33+
/* PAGE_OFFSET - the virtual address of the start of the kernel image */
34+
#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
35+
3336
#ifdef CONFIG_MMU
3437

3538
/*
36-
* PAGE_OFFSET - the virtual address of the start of the kernel image
3739
* TASK_SIZE - the maximum size of a user space task.
3840
* TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
3941
*/
40-
#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
4142
#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M))
4243
#define TASK_UNMAPPED_BASE ALIGN(TASK_SIZE / 3, SZ_16M)
4344

@@ -104,10 +105,6 @@
104105
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
105106
#endif
106107

107-
#ifndef PAGE_OFFSET
108-
#define PAGE_OFFSET PLAT_PHYS_OFFSET
109-
#endif
110-
111108
/*
112109
* The module can be at any place in ram in nommu mode.
113110
*/

0 commit comments

Comments
 (0)