[PATCH] powerpc/mm: Disable registering 16G hugepage size for powernv platform

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Mon Jul 24 17:26:07 AEST 2017


We don't support allocating them runtime. Only supported mechanism as of now is
HMC based hypervisor interface. So disable 16G hugetlb on powernv platform

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
---

May be this should go to -stable ?. To show the 16G pagesize in
/sys/kernel/mm/hugepages/ confuse users

 arch/powerpc/mm/hugetlbpage.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index e1bf5ca397fe..28ea94da0707 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,6 +24,7 @@
 #include <asm/tlb.h>
 #include <asm/setup.h>
 #include <asm/hugetlb.h>
+#include <asm/machdep.h>
 
 #ifdef CONFIG_HUGETLB_PAGE
 
@@ -749,7 +750,8 @@ static int __init add_huge_page_size(unsigned long long size)
 				return -EINVAL;
 		}
 	} else {
-		if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
+		if ((mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
+		    || (mmu_psize == MMU_PAGE_16G && machine_is(powernv)))
 			return -EINVAL;
 	}
 #endif
-- 
2.7.4



More information about the Linuxppc-dev mailing list