From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qVV5Y5sxpzDq6W for ; Wed, 23 Mar 2016 23:59:45 +1100 (AEDT) From: Vaishali Thakkar To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, Vaishali Thakkar , Hillf Danton , Michal Hocko , Yaowei Bai , Dominik Dingel , "Kirill A. Shutemov" , Paul Gortmaker , Dave Hansen Subject: [PATCH v2 4/6] powerpc: mm: Use hugetlb_bad_size Date: Wed, 23 Mar 2016 18:04:27 +0530 Message-Id: <1458736467-15995-1-git-send-email-vaishali.thakkar@oracle.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Update the setup_hugepagesz function to call the routine hugetlb_bad_size when unsupported hugepage size is found. Misc: - Silent checkpatch.pl's 80 characters and printk warning Signed-off-by: Vaishali Thakkar Reviewed-by: Mike Kravetz Reviewed-by: Naoya Horiguchi Cc: Hillf Danton Cc: Michal Hocko Cc: Yaowei Bai Cc: Dominik Dingel Cc: Kirill A. Shutemov Cc: Paul Gortmaker Cc: Dave Hansen --- Please note that the patch is tested for x86 only. But as this is one line change I just changed them. So, it would be good if the patch can be tested for other architectures before adding this in to mainline. Changes since v1: - Separate different arch specific changes in different patches instead of one --- arch/powerpc/mm/hugetlbpage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 6dd272b..3e5e128 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -772,8 +772,10 @@ static int __init hugepage_setup_sz(char *str) size = memparse(str, &str); - if (add_huge_page_size(size) != 0) - printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size); + if (add_huge_page_size(size) != 0) { + hugetlb_bad_size(); + pr_err("Invalid huge page size specified(%llu)\n", size); + } return 1; } -- 2.1.4