lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h1goEuX83jfKYMQJ_5wbpXpt=2XW82yWJYzzyJyGwzYQ@mail.gmail.com>
Date: Thu, 27 Mar 2025 20:09:06 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Zhou Shengqing <zhoushengqing@...info.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, lenb@...nel.org, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org, rafael@...nel.org
Subject: Re: [PATCH v5 2/2] Add acpi_check_dsm() for PCI _DSM definitions

On Thu, Mar 13, 2025 at 11:07 AM Zhou Shengqing
<zhoushengqing@...info.com> wrote:
>
> add acpi_check_dsm() for DSM_PCI_POWER_ON_RESET_DELAY,
> DSM_PCI_DEVICE_READINESS_DURATIONS.
>
> Signed-off-by: Zhou Shengqing <zhoushengqing@...info.com>
> ---
>  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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ