From: Aubrey Li Date: Fri, 2 Jul 2021 07:03:50 +0000 (+0800) Subject: ACPI: Do not singal PRM support if not enabled X-Git-Tag: v5.14-rc1~46^2^4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=392ed6a789803fbfd49994e95fe99cd07b07eb87;p=linux-block.git ACPI: Do not singal PRM support if not enabled If the OS confirms PRM (Platform Runtime Mechanism) support through the \_SB._OSC PRM bit, the BIOS may start relying on the presence of PRM support in the OS, so prevent the PRM bit from being set in the \_SB._OSC capabilities bitmask when PRM support is not built in so as to avoid confusing the BIOS in that case. Fixes: 60faa8f1ac6e ("ACPI: Add \_SB._OSC bit for PRM") Signed-off-by: Aubrey Li [ rjw: Rewrite subject and changelog, replace #ifdef with if (IS_ENABLED()) ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e8119a9eca28..cba00f079eb4 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -305,7 +305,8 @@ static void acpi_bus_osc_negotiate_platform_control(void) capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT; - capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT; + if (IS_ENABLED(CONFIG_ACPI_PRMT)) + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT; #ifdef CONFIG_ARM64 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;