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

ACPI: bus: Fix the _OSC capability check for FFH OpRegion

As per the ACPI specification(vide section Platform-Wide OSPM Capabilities)
the OSPM must set this bit to indicate support for the usage of Functional
Fixed Hardware (FFixedHW) Operation Regions rather than the firmware as
expected in the code.

Update the check accordingly to reflect the requirement as stated in the
specification.

Reported-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Sudeep Holla and committed by
Rafael J. Wysocki
d7d43321 1d280ce0

+3 -6
+3 -6
drivers/acpi/bus.c
··· 300 300 301 301 bool osc_sb_cppc2_support_acked; 302 302 303 - bool osc_sb_ffh_opregion_support_confirmed; 304 - 305 303 static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48"; 306 304 static void acpi_bus_osc_negotiate_platform_control(void) 307 305 { ··· 323 325 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT; 324 326 if (IS_ENABLED(CONFIG_ACPI_PRMT)) 325 327 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT; 328 + if (IS_ENABLED(CONFIG_ACPI_FFH)) 329 + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_FFH_OPR_SUPPORT; 326 330 327 331 #ifdef CONFIG_ARM64 328 332 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT; ··· 385 385 capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT; 386 386 osc_cpc_flexible_adr_space_confirmed = 387 387 capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_CPC_FLEXIBLE_ADR_SPACE; 388 - osc_sb_ffh_opregion_support_confirmed = 389 - capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_FFH_OPR_SUPPORT; 390 388 } 391 389 392 390 kfree(context.ret.pointer); ··· 1410 1412 disable_acpi(); 1411 1413 return result; 1412 1414 } 1413 - if (osc_sb_ffh_opregion_support_confirmed) 1414 - acpi_init_ffh(); 1415 + acpi_init_ffh(); 1415 1416 1416 1417 pci_mmcfg_late_init(); 1417 1418 acpi_iort_init();