lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221110153924.18258-1-kane.chen@intel.com>
Date:   Thu, 10 Nov 2022 23:39:24 +0800
From:   Kane Chen <kane.chen@...el.com>
To:     linux-acpi@...r.kernel.org, rafael.j.wysocki@...el.com,
        kane.chen@...el.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] 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]

Signed-off-by: Kane Chen <kane.chen@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ