Skip to content

Commit a5406a7

Browse files
Kefeng Wangpalmer-dabbelt
authored andcommitted
riscv: Correct SPARSEMEM configuration
There are two issues for RV32, 1) if use FLATMEM, it is useless to enable SPARSEMEM_STATIC. 2) if use SPARSMEM, both SPARSEMEM_VMEMMAP and SPARSEMEM_STATIC is enabled. Fixes: d95f1a5 ("RISC-V: Implement sparsemem") Signed-off-by: Kefeng Wang <[email protected]> Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 78947bd commit a5406a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ config RISCV
9393
select PCI_MSI if PCI
9494
select RISCV_INTC
9595
select RISCV_TIMER if RISCV_SBI
96-
select SPARSEMEM_STATIC if 32BIT
9796
select SPARSE_IRQ
9897
select SYSCTL_EXCEPTION_TRACE
9998
select THREAD_INFO_IN_TASK
@@ -154,7 +153,8 @@ config ARCH_FLATMEM_ENABLE
154153
config ARCH_SPARSEMEM_ENABLE
155154
def_bool y
156155
depends on MMU
157-
select SPARSEMEM_VMEMMAP_ENABLE
156+
select SPARSEMEM_STATIC if 32BIT && SPARSMEM
157+
select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
158158

159159
config ARCH_SELECT_MEMORY_MODEL
160160
def_bool ARCH_SPARSEMEM_ENABLE

0 commit comments

Comments
 (0)