提交 65ac216a 编写于 作者: Y Yazen Ghannam 提交者: Caspar Zhang

ACPI / processor: Set P_LVL{2,3} idle state descriptions

commit 34a62cd0df89dd7034165048c0921d1314191b66 upstream.

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: NYazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NWANG Siyuan <Siyuan.Wang@amd.com>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 18fd4056
...@@ -281,6 +281,13 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) ...@@ -281,6 +281,13 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
pr->power.states[ACPI_STATE_C2].address, pr->power.states[ACPI_STATE_C2].address,
pr->power.states[ACPI_STATE_C3].address)); pr->power.states[ACPI_STATE_C3].address));
snprintf(pr->power.states[ACPI_STATE_C2].desc,
ACPI_CX_DESC_LEN, "ACPI P_LVL2 IOPORT 0x%x",
pr->power.states[ACPI_STATE_C2].address);
snprintf(pr->power.states[ACPI_STATE_C3].desc,
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
pr->power.states[ACPI_STATE_C3].address);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册