Commit b6a95016 authored by Huang Ying's avatar Huang Ying Committed by Len Brown

ACPI, APEI, GHES, Support disable GHES at boot time

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: default avatarHuang Ying <ying.huang@intel.com>
Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
Reviewed-by: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 86cd4733
...@@ -77,6 +77,9 @@ struct ghes { ...@@ -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; static int ghes_panic_timeout __read_mostly = 30;
/* /*
...@@ -665,6 +668,11 @@ static int __init ghes_init(void) ...@@ -665,6 +668,11 @@ static int __init ghes_init(void)
return -EINVAL; return -EINVAL;
} }
if (ghes_disable) {
pr_info(GHES_PFX "GHES is not enabled!\n");
return -EINVAL;
}
rc = ghes_ioremap_init(); rc = ghes_ioremap_init();
if (rc) if (rc)
goto err; goto err;
......
...@@ -231,16 +231,17 @@ void __init acpi_hest_init(void) ...@@ -231,16 +231,17 @@ void __init acpi_hest_init(void)
goto err; goto err;
} }
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count); if (!ghes_disable) {
if (rc) rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
goto err; if (rc)
goto err;
rc = hest_ghes_dev_register(ghes_count); rc = hest_ghes_dev_register(ghes_count);
if (!rc) { if (rc)
pr_info(HEST_PFX "Table parsing has been initialized.\n"); goto err;
return;
} }
pr_info(HEST_PFX "Table parsing has been initialized.\n");
return;
err: err:
hest_disable = 1; hest_disable = 1;
} }
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
extern int hest_disable; extern int hest_disable;
extern int erst_disable; extern int erst_disable;
extern int ghes_disable;
#ifdef CONFIG_ACPI_APEI #ifdef CONFIG_ACPI_APEI
void __init acpi_hest_init(void); void __init acpi_hest_init(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment