sparc/mm/hugepages: Fix setup_hugepagesz for invalid values.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 30 May 2017 19:45:00 +0000 (15:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 20:45:03 +0000 (13:45 -0700)
hugetlb_bad_size needs to be called on invalid values.  Also change the
pr_warn to a pr_err to better align with other platforms.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/init_64.c

index 0cda653ae007645fa01f05b4c40518332159a6ac..7ca1b9dc7d6456c36a05a31e747af60d410d0b81 100644 (file)
@@ -358,7 +358,8 @@ static int __init setup_hugepagesz(char *string)
        }
 
        if ((hv_pgsz_mask & cpu_pgsz_mask) == 0U) {
-               pr_warn("hugepagesz=%llu not supported by MMU.\n",
+               hugetlb_bad_size();
+               pr_err("hugepagesz=%llu not supported by MMU.\n",
                        hugepage_size);
                goto out;
        }