public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: PM: Print full acpi path while adding power resource dev
@ 2022-11-10 15:39 Kane Chen
  2022-11-10 19:46 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Kane Chen @ 2022-11-10 15:39 UTC (permalink / raw)
  To: linux-acpi, rafael.j.wysocki, kane.chen; +Cc: linux-kernel

While debugging boot time issue, it's hard to know what power
resource device kernel is initializing.

It's very helpful to print full path so that ppl don't
need to guess what device is under init. Especially the system
has more than 2 power resource have same name

Before:
[    0.194348] ACPI: PM: Power Resource [RTD3]
[    0.274127] ACPI: PM: Power Resource [RTD3]
[    0.275086] ACPI: PM: Power Resource [PR00]
[    0.438261] ACPI: PM: Power Resource [PR01]

After:
[    0.204875] ACPI: \_SB_.PCI0.RP01.RTD3: [Power Resource]
[    0.284273] ACPI: \_SB_.PCI0.RP08.RTD3: [Power Resource]
[    0.285231] ACPI: \_SB_.PCI0.I2C3.H016.PR00: [Power Resource]
[    0.446410] ACPI: \_SB_.PCI0.SPI1.CRFP.PR01: [Power Resource]

Signed-off-by: Kane Chen <kane.chen@intel.com>
Change-Id: I075146e574aa0d5bfd2f97e3da5f73061af6888a
---
 drivers/acpi/power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index f2588aba8421e..23507d29f0006 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -967,7 +967,7 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle)
 	if (acpi_power_get_state(resource, &state_dummy))
 		__acpi_power_on(resource);
 
-	pr_info("%s [%s]\n", acpi_device_name(device), acpi_device_bid(device));
+	acpi_handle_info(handle, "New power resource\n");
 
 	result = acpi_tie_acpi_dev(device);
 	if (result)
-- 
2.17.1


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

* Re: [PATCH] ACPI: PM: Print full acpi path while adding power resource dev
  2022-11-10 15:39 [PATCH] ACPI: PM: Print full acpi path while adding power resource dev Kane Chen
@ 2022-11-10 19:46 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-11-10 19:46 UTC (permalink / raw)
  To: Kane Chen; +Cc: linux-acpi, rafael.j.wysocki, linux-kernel

On Thu, Nov 10, 2022 at 4:44 PM Kane Chen <kane.chen@intel.com> wrote:
>
> While debugging boot time issue, it's hard to know what power
> resource device kernel is initializing.
>
> It's very helpful to print full path so that ppl don't
> need to guess what device is under init. Especially the system
> has more than 2 power resource have same name
>
> Before:
> [    0.194348] ACPI: PM: Power Resource [RTD3]
> [    0.274127] ACPI: PM: Power Resource [RTD3]
> [    0.275086] ACPI: PM: Power Resource [PR00]
> [    0.438261] ACPI: PM: Power Resource [PR01]
>
> After:
> [    0.204875] ACPI: \_SB_.PCI0.RP01.RTD3: [Power Resource]
> [    0.284273] ACPI: \_SB_.PCI0.RP08.RTD3: [Power Resource]
> [    0.285231] ACPI: \_SB_.PCI0.I2C3.H016.PR00: [Power Resource]
> [    0.446410] ACPI: \_SB_.PCI0.SPI1.CRFP.PR01: [Power Resource]
>
> Signed-off-by: Kane Chen <kane.chen@intel.com>
> Change-Id: I075146e574aa0d5bfd2f97e3da5f73061af6888a
> ---
>  drivers/acpi/power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
> index f2588aba8421e..23507d29f0006 100644
> --- a/drivers/acpi/power.c
> +++ b/drivers/acpi/power.c
> @@ -967,7 +967,7 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle)
>         if (acpi_power_get_state(resource, &state_dummy))
>                 __acpi_power_on(resource);
>
> -       pr_info("%s [%s]\n", acpi_device_name(device), acpi_device_bid(device));
> +       acpi_handle_info(handle, "New power resource\n");
>
>         result = acpi_tie_acpi_dev(device);
>         if (result)
> --

Applied as 6.2 material with edits in the subject and changelog, thanks!

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

end of thread, other threads:[~2022-11-10 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 15:39 [PATCH] ACPI: PM: Print full acpi path while adding power resource dev Kane Chen
2022-11-10 19:46 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox