提交 2aeca6bd 编写于 作者: M Mario Limonciello 提交者: Rafael J. Wysocki

ACPI: CPPC: Check present CPUs for determining _CPC is valid

As this is a static check, it should be based upon what is currently
present on the system. This makes probeing more deterministic.

While local APIC flags field (lapic_flags) of cpu core in MADT table is
0, then the cpu core won't be enabled. In this case, _CPC won't be found
in this core, and return back to _CPC invalid with walking through
possible cpus (include disable cpus). This is not expected, so switch to
check present CPUs instead.
Reported-by: NJinzhou Su <Jinzhou.Su@amd.com>
Signed-off-by: NMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: NHuang Rui <ray.huang@amd.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 a2c8f92b
......@@ -413,7 +413,7 @@ bool acpi_cpc_valid(void)
struct cpc_desc *cpc_ptr;
int cpu;
for_each_possible_cpu(cpu) {
for_each_present_cpu(cpu) {
cpc_ptr = per_cpu(cpc_desc_ptr, cpu);
if (!cpc_ptr)
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册