aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/setup.c
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@linux.ibm.com>2020-12-08 19:47:15 +0100
committerHeiko Carstens <hca@linux.ibm.com>2020-12-10 21:11:01 +0100
commit343dbdb7cb8997a2cb0fd804d6563b8a6de8d49b (patch)
treec913e0c6b8e6f3a3e6e584c9fae0b154f8276cdb /arch/s390/kernel/setup.c
parents390/crypto: add arch_get_random_long() support (diff)
downloadlinux-dev-343dbdb7cb8997a2cb0fd804d6563b8a6de8d49b.tar.xz
linux-dev-343dbdb7cb8997a2cb0fd804d6563b8a6de8d49b.zip
s390/mm: add support to allocate gigantic hugepages using CMA
Commit cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") added support for allocating gigantic hugepages using CMA, by specifying the hugetlb_cma= kernel parameter, which will disable any boot-time allocation of gigantic hugepages. This patch enables that option also for s390. Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r--arch/s390/kernel/setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 756936785598..1f16a03be995 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -49,6 +49,7 @@
#include <linux/memory.h>
#include <linux/compat.h>
#include <linux/start_kernel.h>
+#include <linux/hugetlb.h>
#include <asm/boot_data.h>
#include <asm/ipl.h>
@@ -1146,6 +1147,8 @@ void __init setup_arch(char **cmdline_p)
setup_memory();
dma_contiguous_reserve(ident_map_size);
vmcp_cma_reserve();
+ if (MACHINE_HAS_EDAT2)
+ hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
check_initrd();
reserve_crashkernel();