Commit 148f1678 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[S390] sparsemem: use SPARSEMEM_STATIC if !64BIT.

In case of !64BIT kernel we end up with a zero sized mem_section array.
This happens because NR_MEM_SECTIONS is smaller than SECTIONS_PER_ROOT
but we have:

#define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT)

and

struct mem_section *mem_section[NR_SECTION_ROOTS];

So fix this by selecting SPARSEMEM_STATIC which makes sure
that SECTIONS_PER_ROOT is 1.

Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 5e70b7f3
...@@ -304,6 +304,7 @@ config ARCH_SPARSEMEM_ENABLE ...@@ -304,6 +304,7 @@ config ARCH_SPARSEMEM_ENABLE
def_bool y def_bool y
select SPARSEMEM_VMEMMAP_ENABLE select SPARSEMEM_VMEMMAP_ENABLE
select SPARSEMEM_VMEMMAP select SPARSEMEM_VMEMMAP
select SPARSEMEM_STATIC if !64BIT
config ARCH_SPARSEMEM_DEFAULT config ARCH_SPARSEMEM_DEFAULT
def_bool y def_bool y
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment