Skip to content

Commit db1503d

Browse files
AlexGhitipalmer-dabbelt
authored andcommitted
riscv: Get rid of MAXPHYSMEM configs
CONFIG_MAXPHYSMEM_* are actually never used, even the nommu defconfigs selecting the MAXPHYSMEM_2GB had no effects on PAGE_OFFSET since it was preempted by !MMU case right before. In addition, the move of the kernel mapping at the end of the address space broke the use of MAXPHYSMEM_2G with MMU since it defines PAGE_OFFSET at the same address as the kernel mapping. Reported-by: Geert Uytterhoeven <[email protected]> Fixes: 2bfc6cd ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Alexandre Ghiti <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Tested-by: Conor Dooley <[email protected]> Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent fa55b7d commit db1503d

File tree

4 files changed

+2
-26
lines changed

4 files changed

+2
-26
lines changed

arch/riscv/Kconfig

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,9 @@ config PA_BITS
158158

159159
config PAGE_OFFSET
160160
hex
161-
default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB
161+
default 0xC0000000 if 32BIT
162162
default 0x80000000 if 64BIT && !MMU
163-
default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
164-
default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
163+
default 0xffffffe000000000 if 64BIT
165164

166165
config KASAN_SHADOW_OFFSET
167166
hex
@@ -270,24 +269,6 @@ config MODULE_SECTIONS
270269
bool
271270
select HAVE_MOD_ARCH_SPECIFIC
272271

273-
choice
274-
prompt "Maximum Physical Memory"
275-
default MAXPHYSMEM_1GB if 32BIT
276-
default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
277-
default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
278-
279-
config MAXPHYSMEM_1GB
280-
depends on 32BIT
281-
bool "1GiB"
282-
config MAXPHYSMEM_2GB
283-
depends on 64BIT && CMODEL_MEDLOW
284-
bool "2GiB"
285-
config MAXPHYSMEM_128GB
286-
depends on 64BIT && CMODEL_MEDANY
287-
bool "128GiB"
288-
endchoice
289-
290-
291272
config SMP
292273
bool "Symmetric Multi-Processing"
293274
help

arch/riscv/configs/nommu_k210_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ CONFIG_EMBEDDED=y
2929
CONFIG_SLOB=y
3030
# CONFIG_MMU is not set
3131
CONFIG_SOC_CANAAN=y
32-
CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic"
33-
CONFIG_MAXPHYSMEM_2GB=y
3432
CONFIG_SMP=y
3533
CONFIG_NR_CPUS=2
3634
CONFIG_CMDLINE="earlycon console=ttySIF0"

arch/riscv/configs/nommu_k210_sdcard_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ CONFIG_EMBEDDED=y
2121
CONFIG_SLOB=y
2222
# CONFIG_MMU is not set
2323
CONFIG_SOC_CANAAN=y
24-
CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic"
25-
CONFIG_MAXPHYSMEM_2GB=y
2624
CONFIG_SMP=y
2725
CONFIG_NR_CPUS=2
2826
CONFIG_CMDLINE="earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 ro"

arch/riscv/configs/nommu_virt_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ CONFIG_SLOB=y
2727
# CONFIG_SLAB_MERGE_DEFAULT is not set
2828
# CONFIG_MMU is not set
2929
CONFIG_SOC_VIRT=y
30-
CONFIG_MAXPHYSMEM_2GB=y
3130
CONFIG_SMP=y
3231
CONFIG_CMDLINE="root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0"
3332
CONFIG_CMDLINE_FORCE=y

0 commit comments

Comments
 (0)