diff options
authorTomasz Nowicki <tomasz.nowicki@linaro.org>2013-11-13 17:27:50 +0100
committerTomasz Nowicki <tomasz.nowicki@linaro.org>2013-11-19 13:03:27 +0100
commit96c3450d32b64e57b68545357f89c33d9a637653 (patch)
parent31c7fba599c28c8ef3fc7a08fd02de66a24cbb3c (diff)
apei, hest: Wrap all MCE code inside #ifdef CONFIG_X86_MCE to enable platform other than x86.
Fix compilation error: drivers/acpi/apei/hest.c: In function ‘acpi_hest_init’: drivers/acpi/apei/hest.c:268:7: error: ‘acpi_disable_cmcff’ undeclared (first use in this function) drivers/acpi/apei/hest.c:268:7: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [drivers/acpi/apei/hest.o] Error 1 MCE is X86 platform specific and should be consider only if MCE is configured.
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index f5e37f32c71f..6d06cce5bc1c 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -36,7 +36,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <acpi/apei.h>
+#ifdef CONFIG_X86_MCE
#include <asm/mce.h>
#include "apei-internal.h"
@@ -126,9 +128,9 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
* Check if firmware advertises firmware first mode. We need FF bit to be set
* along with a set of MC banks which work in FF mode.
+#ifdef CONFIG_X86_MCE
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
-#ifdef CONFIG_X86_MCE
int i;
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
@@ -153,9 +155,10 @@ static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
mc_bank = (struct acpi_hest_ia_error_bank *)(cmc + 1);
for (i = 0; i < cmc->num_hardware_banks; i++, mc_bank++)
return 1;
struct ghes_arr {
struct platform_device **ghes_devs;
@@ -263,8 +266,10 @@ void __init acpi_hest_init(void)
goto err;
+#ifdef CONFIG_X86_MCE
if (!acpi_disable_cmcff)
apei_hest_parse(hest_parse_cmc, NULL);
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);