summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-07-09 14:35:14 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-07-17 11:10:08 +0200
commit7358da875332d20e59a49cea3b35bab8c5519d53 (patch)
tree0deb413b14c282408e4876cd5e4997511b171fc7
parentd48c5722248cbbe2e742c2d7e7b8a0417c93bd6b (diff)
ACPI: processor: idle: Introduce lpi_state_debug()
Add a helper macro called lpi_state_debug() for printing debug messages regarding _LPI states and use it in acpi_processor_evaluate_lpi(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2043393.PYKUYFuaPT@rafael.j.wysocki
-rw-r--r--drivers/acpi/processor_idle.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 771a7bd6fb73..f2ebd99a2895 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -869,6 +869,9 @@ static int obj_get_integer(union acpi_object *obj, u32 *value)
return 0;
}
+#define lpi_state_debug(handle, message, state_idx) \
+ acpi_handle_debug(handle, message " for _LPI state %u\n", state_idx)
+
static void process_lpi_state_package(union acpi_object *lpi_pkg,
struct acpi_lpi_state *lpi_state,
acpi_handle handle,
@@ -887,17 +890,13 @@ static void process_lpi_state_package(union acpi_object *lpi_pkg,
struct acpi_power_register *reg;
if (obj->buffer.length < sizeof(*reg)) {
- acpi_handle_debug(handle,
- "Invalid register data for _LPI state %u\n",
- state_idx);
+ lpi_state_debug(handle, "Invalid register data", state_idx);
return;
}
reg = (struct acpi_power_register *)obj->buffer.pointer;
if (reg->space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) {
- acpi_handle_debug(handle,
- "Unsupported entry method for _LPI state %u\n",
- state_idx);
+ lpi_state_debug(handle, "Unsupported entry method", state_idx);
return;
}
@@ -907,23 +906,17 @@ static void process_lpi_state_package(union acpi_object *lpi_pkg,
lpi_state->entry_method = ACPI_CSTATE_INTEGER;
lpi_state->address = obj->integer.value;
} else {
- acpi_handle_debug(handle,
- "Invalid entry method for _LPI state %u\n",
- state_idx);
+ lpi_state_debug(handle, "Invalid entry method", state_idx);
return;
}
if (obj_get_integer(&lpi_pkg_elem[0], &lpi_state->min_residency)) {
- acpi_handle_debug(handle,
- "Assuming 10 us min. residency for _LPI state %u\n",
- state_idx);
+ lpi_state_debug(handle, "Assuming 10 us min. residency", state_idx);
lpi_state->min_residency = 10;
}
if (obj_get_integer(&lpi_pkg_elem[1], &lpi_state->wake_latency)) {
- acpi_handle_debug(handle,
- "Assuming 10 us wake latency for _LPI state %u\n",
- state_idx);
+ lpi_state_debug(handle, "Assuming 10 us wake latency", state_idx);
lpi_state->wake_latency = 10;
}