Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 a7e09d45 ba61ca4a

+4 -2
-2
drivers/acpi/bus.c
··· 544 544 capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT; 545 545 #endif 546 546 547 - #ifdef CONFIG_ACPI_APEI_GHES 548 547 if (!ghes_disable) 549 548 capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT; 550 - #endif 551 549 if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) 552 550 return; 553 551 if (ACPI_SUCCESS(acpi_run_osc(handle, &context))) {
+4
include/acpi/apei.h
··· 18 18 19 19 extern int hest_disable; 20 20 extern int erst_disable; 21 + #ifdef CONFIG_ACPI_APEI_GHES 21 22 extern int ghes_disable; 23 + #else 24 + #define ghes_disable 1 25 + #endif 22 26 23 27 #ifdef CONFIG_ACPI_APEI 24 28 void __init acpi_hest_init(void);