public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Kane Chen <kane.chen@intel.com>
To: linux-acpi@vger.kernel.org, rafael.j.wysocki@intel.com,
	kane.chen@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ACPI: PM: Print full acpi path while adding power resource dev
Date: Thu, 10 Nov 2022 23:39:24 +0800	[thread overview]
Message-ID: <20221110153924.18258-1-kane.chen@intel.com> (raw)

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


             reply	other threads:[~2022-11-10 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 15:39 Kane Chen [this message]
2022-11-10 19:46 ` [PATCH] ACPI: PM: Print full acpi path while adding power resource dev Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221110153924.18258-1-kane.chen@intel.com \
    --to=kane.chen@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox