All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][V3] ACPI/PCI: pci_link: allow the absence of _PSR and change log level
@ 2018-02-23  5:43 Alex Hung
  2018-02-23 14:50 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Hung @ 2018-02-23  5:43 UTC (permalink / raw)
  To: rjw, lenb, alex.hung, linux-pci, linux-acpi

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>
---
 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 bc3d914..65f1908 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,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][V3] ACPI/PCI: pci_link: allow the absence of _PSR and change log level
  2018-02-23  5:43 [PATCH][V3] ACPI/PCI: pci_link: allow the absence of _PSR and change log level Alex Hung
@ 2018-02-23 14:50 ` Bjorn Helgaas
  2018-03-14 11:43   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2018-02-23 14:50 UTC (permalink / raw)
  To: Alex Hung; +Cc: rjw, lenb, linux-pci, linux-acpi

In subject:

s/allow the/Allow the/ to match drivers/acpi capitalization convention
s/_PSR/_PRS/ to fix typo

On Thu, Feb 22, 2018 at 09:43:44PM -0800, Alex Hung wrote:
> 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>

> ---
>  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 bc3d914..65f1908 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");

The rest of this file uses ACPI_EXCEPTION(), ACPI_DEBUG_PRINT(), etc.
My personal preference would be to keep the file consistent, e.g.,
maybe use the style that matches the file in this patch, and have a
second patch that changes all the logging in the file to use
acpi_handle_*().

But I'm fine with whatever you and Rafael want to do about this.

> +		return 0;
>  	}
>  
>  	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][V3] ACPI/PCI: pci_link: allow the absence of _PSR and change log level
  2018-02-23 14:50 ` Bjorn Helgaas
@ 2018-03-14 11:43   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2018-03-14 11:43 UTC (permalink / raw)
  To: Bjorn Helgaas, Alex Hung; +Cc: lenb, linux-pci, linux-acpi

On Friday, February 23, 2018 3:50:26 PM CET Bjorn Helgaas wrote:
> In subject:
> 
> s/allow the/Allow the/ to match drivers/acpi capitalization convention
> s/_PSR/_PRS/ to fix typo
> 
> On Thu, Feb 22, 2018 at 09:43:44PM -0800, Alex Hung wrote:
> > 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>
> 
> > ---
> >  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 bc3d914..65f1908 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");
> 
> The rest of this file uses ACPI_EXCEPTION(), ACPI_DEBUG_PRINT(), etc.
> My personal preference would be to keep the file consistent, e.g.,
> maybe use the style that matches the file in this patch, and have a
> second patch that changes all the logging in the file to use
> acpi_handle_*().
> 
> But I'm fine with whatever you and Rafael want to do about this.

I wanted it to be changed.

Using ACPI_DEBUG_PRINT() and similar outside of ACPICA code is
questionable and plain problematic with some combinations of Kconfig
options, so I'd actually prefer them to go away from the ACPI code
outside of ACPICA.

Patch applied with the subject typo fixed, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-14 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23  5:43 [PATCH][V3] ACPI/PCI: pci_link: allow the absence of _PSR and change log level Alex Hung
2018-02-23 14:50 ` Bjorn Helgaas
2018-03-14 11:43   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.