Re: [PATCH v5 2/2] Add acpi_check_dsm() for PCI _DSM definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 13, 2025 at 11:07 AM Zhou Shengqing
<zhoushengqing@xxxxxxxxxxx> wrote:
>
> add acpi_check_dsm() for DSM_PCI_POWER_ON_RESET_DELAY,
> DSM_PCI_DEVICE_READINESS_DURATIONS.
>
> Signed-off-by: Zhou Shengqing <zhoushengqing@xxxxxxxxxxx>
> ---
>  drivers/pci/pci-acpi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 4f9e0548c96d..47caad28a133 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -1257,6 +1257,10 @@ void acpi_pci_add_bus(struct pci_bus *bus)
>         if (!pci_is_root_bus(bus))
>                 return;
>
> +       if (!acpi_check_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
> +                               BIT(DSM_PCI_POWER_ON_RESET_DELAY)))
> +               return;
> +
>         obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
>                                       DSM_PCI_POWER_ON_RESET_DELAY, NULL, ACPI_TYPE_INTEGER);
>         if (!obj)
> @@ -1418,6 +1422,10 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
>         if (bridge->ignore_reset_delay)
>                 pdev->d3cold_delay = 0;
>
> +       if (!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 3,
> +                               BIT(DSM_PCI_DEVICE_READINESS_DURATIONS)))
> +               return;
> +
>         obj = acpi_evaluate_dsm_typed(handle, &pci_acpi_dsm_guid, 3,
>                                       DSM_PCI_DEVICE_READINESS_DURATIONS, NULL,
>                                       ACPI_TYPE_PACKAGE);
> --

The code changes look reasonable to me, although it would be cleaner
to use a local variable for the revision instead of repeating the
number 3 multiple times, but please add the "PCI/ACPI:" prefix to the
subject.





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux