Skip to content

Commit 34a62cd

Browse files
yghannamrafaeljw
authored andcommitted
ACPI / processor: Set P_LVL{2,3} idle state descriptions
The ACPI idle driver will fallback to using the legacy P_LVL* SystemIO method of entering C-states if the _CST method is disabled and P_BLK is defined. However, in this case the C2 and C3 states won't have a description set, so the user will see "<null>" when reading the description from sysfs. Give each of these states a description. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 04b1d5d commit 34a62cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/acpi/processor_idle.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
282282
pr->power.states[ACPI_STATE_C2].address,
283283
pr->power.states[ACPI_STATE_C3].address));
284284

285+
snprintf(pr->power.states[ACPI_STATE_C2].desc,
286+
ACPI_CX_DESC_LEN, "ACPI P_LVL2 IOPORT 0x%x",
287+
pr->power.states[ACPI_STATE_C2].address);
288+
snprintf(pr->power.states[ACPI_STATE_C3].desc,
289+
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
290+
pr->power.states[ACPI_STATE_C3].address);
291+
285292
return 0;
286293
}
287294

0 commit comments

Comments
 (0)