Skip to contentSkip to conversation

ACPI: PM: Print full acpi path while adding power resource dev

PATCH Applied Kane Chen 2 participants 2 messages Nov 10, 2022 ACPI

lore
Share & tools
lore

Kane Chen

author
#0 lore raw

PATCH 1/1 ACPI: PM: Print full acpi path while adding power resource dev

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]
Change-Id I075146e574aa0d5bfd2f97e3da5f73061af6888a
---
 drivers/acpi/power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/power.c +1 -1
index f2588aba8421e..23507d29f0006 100644
@@ -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)
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 31 lines · Kane Chen

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]
Change-Id I075146e574aa0d5bfd2f97e3da5f73061af6888a
---
 drivers/acpi/power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/power.c +0 -0
index f2588aba8421e..23507d29f0006 100644

drivers/acpi/power.c struct acpi_device *acpi_add_power_resource(acpi_handle handle)

Quoted 9 lines
drivers/acpi/power.c +1 -2
@@ -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!