[PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size

Michael Neuling mikey at neuling.org
Wed Jan 4 11:18:57 AEDT 2017


On Tue, 2016-12-13 at 19:34 +0530, Aneesh Kumar K.V wrote:
> generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0
> we get
> [0.241333] hugetlbfs: disabling because there are no supported hugepage sizes
> 
> bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
> bash: echo: write error: Operation not supported
> 
> Fixes: "powerpc: get hugetlbpage handling more generic"
> Reported-by: Chris Smart <csmart at ozlabs.au.ibm.com>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

Acked-By: Michael Neuling <mikey at neuling.org>

> ---
>  arch/powerpc/mm/hugetlbpage.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
> index 289df38fb7e0..e46bbd716832 100644
> --- a/arch/powerpc/mm/hugetlbpage.c
> +++ b/arch/powerpc/mm/hugetlbpage.c
> @@ -852,9 +852,6 @@ static int __init hugetlbpage_init(void)
>  	else if (mmu_psize_defs[MMU_PAGE_2M].shift)
>  		HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_2M].shift;
>  #endif
> -	else
> -		panic("%s: Unable to set default huge page size\n",
> __func__);
> -
>  	return 0;
>  }
>  


More information about the Linuxppc-dev mailing list