On 11/13/2013 09:29 AM, Tomasz Nowicki wrote:
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.
drivers/acpi/apei/hest.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index f5e37f3..6d06cce 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> +#endif
#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++) mce_disable_bank(mc_bank->bank_number); -#endif
- return 1; }
+#endif
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); +#endif
if (!ghes_disable) { rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
Acked-by: Al Stone al.stone@linaro.org