From 343dbdb7cb8997a2cb0fd804d6563b8a6de8d49b Mon Sep 17 00:00:00 2001 From: Gerald Schaefer Date: Tue, 8 Dec 2020 19:47:15 +0100 Subject: [PATCH] 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 Signed-off-by: Heiko Carstens --- arch/s390/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) 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 #include #include +#include #include #include @@ -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();