Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE
@ 2021-10-05 20:25 Mike Kravetz
  2021-10-05 20:54 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mike Kravetz @ 2021-10-05 20:25 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Anshuman Khandual
  Cc: Will Deacon, Mark Rutland, Barry Song, Andrew Morton,
	Mike Kravetz, stable

For non-4K PAGE_SIZE configs, the largest gigantic huge page size is
CONT_PMD_SHIFT order.

Fixes: abb7962adc80 ("arm64/hugetlb: Reserve CMA areas for gigantic
pages on 16K and 64K configs")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: <stable@vger.kernel.org>
---
 arch/arm64/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 23505fc35324..a8158c948966 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -43,7 +43,7 @@ void __init arm64_hugetlb_cma_reserve(void)
 #ifdef CONFIG_ARM64_4K_PAGES
 	order = PUD_SHIFT - PAGE_SHIFT;
 #else
-	order = CONT_PMD_SHIFT + PMD_SHIFT - PAGE_SHIFT;
+	order = CONT_PMD_SHIFT - PAGE_SHIFT;
 #endif
 	/*
 	 * HugeTLB CMA reservation is required for gigantic
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-06 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-05 20:25 [PATCH] arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE Mike Kravetz
2021-10-05 20:54 ` Andrew Morton
2021-10-05 21:28   ` Mike Kravetz
2021-10-05 23:15     ` Andrew Morton
2021-10-06  7:55 ` Anshuman Khandual
2021-10-06 13:06 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox