diff options
| author | Huang Ying <ying.huang@intel.com> | 2011-07-13 01:14:19 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2011-07-13 23:36:34 -0400 |
| commit | b6a9501658530d8b8374e37f1edb549039a8a260 (patch) | |
| tree | e41103e3cd5a389d679b208eb254430f5100db68 | |
| parent | 86cd47334b00b6aa9b5d0ebf389a6fe76f21c641 (diff) | |
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: 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>
| -rw-r--r-- | drivers/acpi/apei/ghes.c | 8 | ||||
| -rw-r--r-- | drivers/acpi/apei/hest.c | 17 | ||||
| -rw-r--r-- | include/acpi/apei.h | 1 |
3 files changed, 18 insertions, 8 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index f339c0f8369c..b142b94bf8b2 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
| @@ -77,6 +77,9 @@ struct ghes { | |||
| 77 | }; | 77 | }; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | int ghes_disable; | ||
| 81 | module_param_named(disable, ghes_disable, bool, 0); | ||
| 82 | |||
| 80 | static int ghes_panic_timeout __read_mostly = 30; | 83 | static int ghes_panic_timeout __read_mostly = 30; |
| 81 | 84 | ||
| 82 | /* | 85 | /* |
| @@ -665,6 +668,11 @@ static int __init ghes_init(void) | |||
| 665 | return -EINVAL; | 668 | return -EINVAL; |
| 666 | } | 669 | } |
| 667 | 670 | ||
| 671 | if (ghes_disable) { | ||
| 672 | pr_info(GHES_PFX "GHES is not enabled!\n"); | ||
| 673 | return -EINVAL; | ||
| 674 | } | ||
| 675 | |||
| 668 | rc = ghes_ioremap_init(); | 676 | rc = ghes_ioremap_init(); |
| 669 | if (rc) | 677 | if (rc) |
| 670 | goto err; | 678 | goto err; |
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 181bc2f7bb74..05fee06f4d6e 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c | |||
| @@ -231,16 +231,17 @@ void __init acpi_hest_init(void) | |||
| 231 | goto err; | 231 | goto err; |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count); | 234 | if (!ghes_disable) { |
| 235 | if (rc) | 235 | rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count); |
| 236 | goto err; | 236 | if (rc) |
| 237 | 237 | goto err; | |
| 238 | rc = hest_ghes_dev_register(ghes_count); | 238 | rc = hest_ghes_dev_register(ghes_count); |
| 239 | if (!rc) { | 239 | if (rc) |
| 240 | pr_info(HEST_PFX "Table parsing has been initialized.\n"); | 240 | goto err; |
| 241 | return; | ||
| 242 | } | 241 | } |
| 243 | 242 | ||
| 243 | pr_info(HEST_PFX "Table parsing has been initialized.\n"); | ||
| 244 | return; | ||
| 244 | err: | 245 | err: |
| 245 | hest_disable = 1; | 246 | hest_disable = 1; |
| 246 | } | 247 | } |
diff --git a/include/acpi/apei.h b/include/acpi/apei.h index e67b523a50e1..d40bc5521fcb 100644 --- a/include/acpi/apei.h +++ b/include/acpi/apei.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | extern int hest_disable; | 19 | extern int hest_disable; |
| 20 | extern int erst_disable; | 20 | extern int erst_disable; |
| 21 | extern int ghes_disable; | ||
| 21 | 22 | ||
| 22 | #ifdef CONFIG_ACPI_APEI | 23 | #ifdef CONFIG_ACPI_APEI |
| 23 | void __init acpi_hest_init(void); | 24 | void __init acpi_hest_init(void); |
