x86: mm: use hugetlb_bad_size()
authorVaishali Thakkar <[email protected]>
Fri, 20 May 2016 00:11:20 +0000 (17:11 -0700)
committerLinus Torvalds <[email protected]>
Fri, 20 May 2016 02:12:14 +0000 (19:12 -0700)
Update setup_hugepagesz() to call 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]>
Acked-by: Michal Hocko <[email protected]>
Cc: Hillf Danton <[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]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/x86/mm/hugetlbpage.c

index 14a95054d4e058a85f6b8d80c162aa2617e7f848..2ae8584b44c73d7c93b30b80ca643109f6e5bcf5 100644 (file)
@@ -165,6 +165,7 @@ static __init int setup_hugepagesz(char *opt)
        } else if (ps == PUD_SIZE && boot_cpu_has(X86_FEATURE_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;