Commit 157080f0 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Catalin Marinas

ACPI: processor: Drop duplicated check on _STA (enabled + present)

The ACPI bus scan will only result in acpi_processor_add() being called
if _STA has already been checked and the result is that the
processor is enabled and present.  Hence drop this additional check.
Suggested-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Tested-by: default avatarMiguel Luis <miguel.luis@oracle.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240529133446.28446-4-Jonathan.Cameron@huawei.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent d830ef3a
......@@ -186,17 +186,11 @@ static void __init acpi_pcc_cpufreq_init(void) {}
#ifdef CONFIG_ACPI_HOTPLUG_CPU
static int acpi_processor_hotadd_init(struct acpi_processor *pr)
{
unsigned long long sta;
acpi_status status;
int ret;
if (invalid_phys_cpuid(pr->phys_id))
return -ENODEV;
status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT))
return -ENODEV;
cpu_maps_update_begin();
cpus_write_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment