Update the setup_hugepagesz function to call the routine hugetlb_bad_size when unsupported hugepage size is found.
Signed-off-by: Vaishali Thakkar <[email protected]> Reviewed-by: Naoya Horiguchi <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Yaowei Bai <[email protected]> Cc: Dominik Dingel <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Dave Hansen <[email protected]> --- Changes since v1: - Separate different arch specific changes in different patches instead of one --- arch/x86/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 740d7ac..3ec44f8 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c @@ -165,6 +165,7 @@ static __init int setup_hugepagesz(char *opt) } else if (ps == PUD_SIZE && cpu_has_gbpages) { hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); } else { + hugetlb_bad_size(); printk(KERN_ERR "hugepagesz: Unsupported page size %lu M\n", ps >> 20); return 0; -- 2.1.4

