diff mbox series

[1/1,SRU,Bionic] ACPI / PCI: pci_link: Allow the absence of _PRS and change log level

Message ID 1527478042-537-2-git-send-email-alex.hung@canonical.com
State New
Headers show
Series Remove false errors "AE_NOT_FOUND, Evaluating _PRS" | expand

Commit Message

Alex Hung May 28, 2018, 3:27 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1773295

In recent Intel hardware the IRQs become non-configurable after BIOS
initializes them in PEI phase and _PRS objects are no longer included in
ASL.

This is the same as "static (non-configurable) devices do not
specify a _PRS object" in ACPI spec. As a result, error messages
saying "ACPI Exception: AE_NOT_FOUND, Evaluating _PRS" does not need to
be in kernel messenges all the time but only when debug is enabled, and
acpi_pci_link_get_possible should not return -ENODEV when _PRS is
absent.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 92d1b381f677cbd2d4370dc3b8d0679b7f0ace32)
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 drivers/acpi/pci_link.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Colin Ian King May 28, 2018, 9:27 a.m. UTC | #1
On 28/05/18 04:27, Alex Hung wrote:
> BugLink: https://bugs.launchpad.net/bugs/1773295
> 
> In recent Intel hardware the IRQs become non-configurable after BIOS
> initializes them in PEI phase and _PRS objects are no longer included in
> ASL.
> 
> This is the same as "static (non-configurable) devices do not
> specify a _PRS object" in ACPI spec. As a result, error messages
> saying "ACPI Exception: AE_NOT_FOUND, Evaluating _PRS" does not need to
> be in kernel messenges all the time but only when debug is enabled, and
> acpi_pci_link_get_possible should not return -ENODEV when _PRS is
> absent.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit 92d1b381f677cbd2d4370dc3b8d0679b7f0ace32)
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  drivers/acpi/pci_link.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> index bc3d914dfc3e..65f1908480d4 100644
> --- a/drivers/acpi/pci_link.c
> +++ b/drivers/acpi/pci_link.c
> @@ -173,8 +173,8 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
>  	status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS,
>  				     acpi_pci_link_check_possible, link);
>  	if (ACPI_FAILURE(status)) {
> -		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
> -		return -ENODEV;
> +		acpi_handle_debug(link->device->handle, "_PRS not present or invalid");
> +		return 0;
>  	}
>  
>  	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> 
Upstream cherry pick, makes lots of sense.

Acked-by: Colin Ian King <colin.king@canonical.com>
Kleber Sacilotto de Souza June 5, 2018, 12:23 a.m. UTC | #2
On 05/27/18 20:27, Alex Hung wrote:
> BugLink: https://bugs.launchpad.net/bugs/1773295
> 
> In recent Intel hardware the IRQs become non-configurable after BIOS
> initializes them in PEI phase and _PRS objects are no longer included in
> ASL.
> 
> This is the same as "static (non-configurable) devices do not
> specify a _PRS object" in ACPI spec. As a result, error messages
> saying "ACPI Exception: AE_NOT_FOUND, Evaluating _PRS" does not need to
> be in kernel messenges all the time but only when debug is enabled, and
> acpi_pci_link_get_possible should not return -ENODEV when _PRS is
> absent.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit 92d1b381f677cbd2d4370dc3b8d0679b7f0ace32)
> Signed-off-by: Alex Hung <alex.hung@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>  drivers/acpi/pci_link.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> index bc3d914dfc3e..65f1908480d4 100644
> --- a/drivers/acpi/pci_link.c
> +++ b/drivers/acpi/pci_link.c
> @@ -173,8 +173,8 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
>  	status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS,
>  				     acpi_pci_link_check_possible, link);
>  	if (ACPI_FAILURE(status)) {
> -		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
> -		return -ENODEV;
> +		acpi_handle_debug(link->device->handle, "_PRS not present or invalid");
> +		return 0;
>  	}
>  
>  	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
>
diff mbox series

Patch

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index bc3d914dfc3e..65f1908480d4 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -173,8 +173,8 @@  static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
 	status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS,
 				     acpi_pci_link_check_possible, link);
 	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
-		return -ENODEV;
+		acpi_handle_debug(link->device->handle, "_PRS not present or invalid");
+		return 0;
 	}
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,