浏览代码

ACPI: APEI build fix

as GHES is optional...

When # CONFIG_ACPI_APEI_GHES is not set:

(.init.text+0x4c22): undefined reference to `ghes_disable'

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown 14 年之前
父节点
当前提交
a7e09d450b
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 0 2
      drivers/acpi/bus.c
  2. 4 0
      include/acpi/apei.h

+ 0 - 2
drivers/acpi/bus.c

@@ -544,10 +544,8 @@ static void acpi_bus_osc_support(void)
 	capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT;
 	capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT;
 #endif
 #endif
 
 
-#ifdef CONFIG_ACPI_APEI_GHES
 	if (!ghes_disable)
 	if (!ghes_disable)
 		capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT;
 		capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT;
-#endif
 	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
 	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
 		return;
 		return;
 	if (ACPI_SUCCESS(acpi_run_osc(handle, &context))) {
 	if (ACPI_SUCCESS(acpi_run_osc(handle, &context))) {

+ 4 - 0
include/acpi/apei.h

@@ -18,7 +18,11 @@
 
 
 extern int hest_disable;
 extern int hest_disable;
 extern int erst_disable;
 extern int erst_disable;
+#ifdef CONFIG_ACPI_APEI_GHES
 extern int ghes_disable;
 extern int ghes_disable;
+#else
+#define ghes_disable 1
+#endif
 
 
 #ifdef CONFIG_ACPI_APEI
 #ifdef CONFIG_ACPI_APEI
 void __init acpi_hest_init(void);
 void __init acpi_hest_init(void);