summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2021-01-29 22:00:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-10 11:29:17 +0300
commitc026844c6156e9c9e7d529443e7d5b12d0aba02b (patch)
treed70895894cd49bfeaca01301109c184d0f5ba1fa /arch
parent57ea7b257a1a764e0910dbeffcbffc30b6bfc431 (diff)
downloadlinux-c026844c6156e9c9e7d529443e7d5b12d0aba02b.tar.xz
RISC-V: Define MAXPHYSMEM_1GB only for RV32
commit de5f4b8f634beacf667e6eff334522601dd03b59 upstream. MAXPHYSMEM_1GB option was added for RV32 because RV32 only supports 1GB of maximum physical memory. This lead to few compilation errors reported by kernel test robot which created the following configuration combination which are not useful but can be configured. 1. MAXPHYSMEM_1GB & RV64 2, MAXPHYSMEM_2GB & RV32 Fix this by restricting MAXPHYSMEM_1GB for RV32 and MAXPHYSMEM_2GB only for RV64. Fixes: e557793799c5 ("RISC-V: Fix maximum allowed phsyical memory for RV32") Cc: stable@vger.kernel.org Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 234a21d26f67..3474286e59db 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -252,8 +252,10 @@ choice
default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
config MAXPHYSMEM_1GB
+ depends on 32BIT
bool "1GiB"
config MAXPHYSMEM_2GB
+ depends on 64BIT && CMODEL_MEDLOW
bool "2GiB"
config MAXPHYSMEM_128GB
depends on 64BIT && CMODEL_MEDANY