]> git.itanic.dy.fi Git - linux-stable/commitdiff
ACPI: bus: Fix the _OSC capability check for FFH OpRegion
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 18 Nov 2022 14:00:59 +0000 (14:00 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 21 Nov 2022 19:11:09 +0000 (20:11 +0100)
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>
drivers/acpi/bus.c

index 245fb0828e473684130a3e52d6fde552fde3a697..2b9eac7e77771c890eb5b9a288a3c61e94b03d8b 100644 (file)
@@ -300,8 +300,6 @@ EXPORT_SYMBOL_GPL(osc_sb_native_usb4_support_confirmed);
 
 bool osc_sb_cppc2_support_acked;
 
-bool osc_sb_ffh_opregion_support_confirmed;
-
 static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48";
 static void acpi_bus_osc_negotiate_platform_control(void)
 {
@@ -325,6 +323,8 @@ static void acpi_bus_osc_negotiate_platform_control(void)
        capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
        if (IS_ENABLED(CONFIG_ACPI_PRMT))
                capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
+       if (IS_ENABLED(CONFIG_ACPI_FFH))
+               capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_FFH_OPR_SUPPORT;
 
 #ifdef CONFIG_ARM64
        capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
@@ -385,8 +385,6 @@ static void acpi_bus_osc_negotiate_platform_control(void)
                        capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
                osc_cpc_flexible_adr_space_confirmed =
                        capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_CPC_FLEXIBLE_ADR_SPACE;
-               osc_sb_ffh_opregion_support_confirmed =
-                       capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_FFH_OPR_SUPPORT;
        }
 
        kfree(context.ret.pointer);
@@ -1412,8 +1410,7 @@ static int __init acpi_init(void)
                disable_acpi();
                return result;
        }
-       if (osc_sb_ffh_opregion_support_confirmed)
-               acpi_init_ffh();
+       acpi_init_ffh();
 
        pci_mmcfg_late_init();
        acpi_iort_init();