Skip to content

Commit 157080f

Browse files
jic23ctmarinas
authored andcommitted
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: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Miguel Luis <miguel.luis@oracle.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20240529133446.28446-4-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent d830ef3 commit 157080f

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

drivers/acpi/acpi_processor.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,11 @@ static void __init acpi_pcc_cpufreq_init(void) {}
186186
#ifdef CONFIG_ACPI_HOTPLUG_CPU
187187
static int acpi_processor_hotadd_init(struct acpi_processor *pr)
188188
{
189-
unsigned long long sta;
190-
acpi_status status;
191189
int ret;
192190

193191
if (invalid_phys_cpuid(pr->phys_id))
194192
return -ENODEV;
195193

196-
status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta);
197-
if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT))
198-
return -ENODEV;
199-
200194
cpu_maps_update_begin();
201195
cpus_write_lock();
202196

0 commit comments

Comments
 (0)