Skip to contentSkip to conversation

powerpc: Avoid reserving hugepages twice on PPC32

PATCH New John Ogness 1 participant 1 message Jul 28, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Avoid reserving hugepages twice on PPC32

On PPC32, reserve_hugetlb_gpages() is already called in MMU_init().

---
 arch/powerpc/kernel/setup-common.c |    3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/kernel/setup-common.c +3 -0
index 94a9482..1d5d2de 100644
@@ -920,8 +920,11 @@ void __init setup_arch(char **cmdline_p)
 	 * Reserve any gigantic pages requested on the command line.
 	 * memblock needs to have been initialized by the time this is
 	 * called since this will reserve memory.
+	 * (PPC32 did this already in MMU_init())
 	 */
+#ifdef CONFIG_PPC64
 	reserve_hugetlb_gpages();
+#endif
 
 	klp_init_thread_info(&init_thread_info);
 
Signature · 1 line
1.7.10.4