hugetlb: introduce generic version of hugetlb_free_pgd_range
[linux/fpc-iii.git] / arch / x86 / kernel / acpi / apei.c
blobbb8d300fecbdd09c9469f796934a1d25caf19fb5
1 /*
2 * Arch-specific APEI-related functions.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <acpi/apei.h>
17 #include <asm/mce.h>
18 #include <asm/tlbflush.h>
20 int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
22 #ifdef CONFIG_X86_MCE
23 int i;
24 struct acpi_hest_ia_corrected *cmc;
25 struct acpi_hest_ia_error_bank *mc_bank;
27 cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
28 if (!cmc->enabled)
29 return 0;
32 * We expect HEST to provide a list of MC banks that report errors
33 * in firmware first mode. Otherwise, return non-zero value to
34 * indicate that we are done parsing HEST.
36 if (!(cmc->flags & ACPI_HEST_FIRMWARE_FIRST) ||
37 !cmc->num_hardware_banks)
38 return 1;
40 pr_info("HEST: Enabling Firmware First mode for corrected errors.\n");
42 mc_bank = (struct acpi_hest_ia_error_bank *)(cmc + 1);
43 for (i = 0; i < cmc->num_hardware_banks; i++, mc_bank++)
44 mce_disable_bank(mc_bank->bank_number);
45 #endif
46 return 1;
49 void arch_apei_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
51 #ifdef CONFIG_X86_MCE
52 apei_mce_report_mem_error(sev, mem_err);
53 #endif