aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaishali Thakkar <[email protected]>2016-05-19 17:11:20 -0700
committerLinus Torvalds <[email protected]>2016-05-19 19:12:14 -0700
commit2b18e5321f512aa85fd91db835a4c0dcdb2cd063 (patch)
tree9c554f7281f047f936847c43a9d2dc15678d39e0
parentb3d424f1a534949bce27847aa871b3ce75c60f4d (diff)
x86: mm: use hugetlb_bad_size()
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]>
-rw-r--r--arch/x86/mm/hugetlbpage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index 14a95054d4e0..2ae8584b44c7 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 && 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;