diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2013-07-19 12:50:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-08-12 11:55:12 -0400 |
commit | 7781544e7c367d0cae87feb0f0675fd333bfc9d8 (patch) | |
tree | 65fc1a548b1b2d5f932cba55c487477409bf4241 | |
parent | 0237d7f355eef4d9ab8557e1597e8c9debd6c8c2 (diff) |
x86/mce, acpi/apei: Only disable banks listed in HEST if mce is configured
Randconfig testing found this build error:
>> hest.c(.init.text+0x6004): undefined reference to 'mce_disable_bank'
Fix by wrapping body of hest_parse_cmc() inside #ifdef
CONFIG_X86_MCE
Reported-by: "Wu, Fengguang" <fengguang.wu@intel.com>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/0129220@agluck-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | drivers/acpi/apei/hest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 502024502b13..f5e37f32c71f 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c | |||
@@ -128,6 +128,7 @@ EXPORT_SYMBOL_GPL(apei_hest_parse); | |||
128 | */ | 128 | */ |
129 | static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) | 129 | static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) |
130 | { | 130 | { |
131 | #ifdef CONFIG_X86_MCE | ||
131 | int i; | 132 | int i; |
132 | struct acpi_hest_ia_corrected *cmc; | 133 | struct acpi_hest_ia_corrected *cmc; |
133 | struct acpi_hest_ia_error_bank *mc_bank; | 134 | struct acpi_hest_ia_error_bank *mc_bank; |
@@ -152,7 +153,7 @@ static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) | |||
152 | mc_bank = (struct acpi_hest_ia_error_bank *)(cmc + 1); | 153 | mc_bank = (struct acpi_hest_ia_error_bank *)(cmc + 1); |
153 | for (i = 0; i < cmc->num_hardware_banks; i++, mc_bank++) | 154 | for (i = 0; i < cmc->num_hardware_banks; i++, mc_bank++) |
154 | mce_disable_bank(mc_bank->bank_number); | 155 | mce_disable_bank(mc_bank->bank_number); |
155 | 156 | #endif | |
156 | return 1; | 157 | return 1; |
157 | } | 158 | } |
158 | 159 | ||