ACPI, APEI, GHES, Support disable GHES at boot time
authorHuang Ying <ying.huang@intel.com>
Wed, 13 Jul 2011 05:14:19 +0000 (13:14 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jul 2011 03:36:34 +0000 (23:36 -0400)
Some machine may have broken firmware so that GHES and firmware first
mode should be disabled.  This patch adds support to that.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/apei/ghes.c
drivers/acpi/apei/hest.c
include/acpi/apei.h

index f339c0f8369c6b179b23b3fc2f72db9e755fc1ed..b142b94bf8b2cefd70f0b178261a64d85bfcb045 100644 (file)
@@ -77,6 +77,9 @@ struct ghes {
        };
 };
 
+int ghes_disable;
+module_param_named(disable, ghes_disable, bool, 0);
+
 static int ghes_panic_timeout  __read_mostly = 30;
 
 /*
@@ -665,6 +668,11 @@ static int __init ghes_init(void)
                return -EINVAL;
        }
 
+       if (ghes_disable) {
+               pr_info(GHES_PFX "GHES is not enabled!\n");
+               return -EINVAL;
+       }
+
        rc = ghes_ioremap_init();
        if (rc)
                goto err;
index 181bc2f7bb7411a4b300c23c2450ad79ae129a4b..05fee06f4d6e03019a3bc55bd3595b8967304669 100644 (file)
@@ -231,16 +231,17 @@ void __init acpi_hest_init(void)
                goto err;
        }
 
-       rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
-       if (rc)
-               goto err;
-
-       rc = hest_ghes_dev_register(ghes_count);
-       if (!rc) {
-               pr_info(HEST_PFX "Table parsing has been initialized.\n");
-               return;
+       if (!ghes_disable) {
+               rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
+               if (rc)
+                       goto err;
+               rc = hest_ghes_dev_register(ghes_count);
+               if (rc)
+                       goto err;
        }
 
+       pr_info(HEST_PFX "Table parsing has been initialized.\n");
+       return;
 err:
        hest_disable = 1;
 }
index e67b523a50e1a3bee89745d389b19e20466b80bd..d40bc5521fcb31d55dafa2d87912e88fd9d71bc3 100644 (file)
@@ -18,6 +18,7 @@
 
 extern int hest_disable;
 extern int erst_disable;
+extern int ghes_disable;
 
 #ifdef CONFIG_ACPI_APEI
 void __init acpi_hest_init(void);