diff options
| author | Rafael J. Wysocki <[email protected]> | 2024-02-26 16:40:52 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2024-02-27 16:54:59 +0000 |
| commit | 1b4f02a34f095b96de36fa16755f5598ba380939 (patch) | |
| tree | 72733ca7c3c494c0a93f3b905c03174ed4665466 /drivers/acpi/acpi_processor.c | |
| parent | ACPI: scan: Relocate acpi_bus_trim_one() (diff) | |
| download | kernel-1b4f02a34f095b96de36fa16755f5598ba380939.tar.gz kernel-1b4f02a34f095b96de36fa16755f5598ba380939.zip | |
ACPI: scan: Make acpi_processor_add() check the device enabled bit
Modify acpi_processor_add() return an error if _STA returns the enabled
bit clear for the given processor device, so as to avoid using processors
that don't decode their resources, as per the ACPI specification. [1]
Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#sta-device-status # [1]
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
| -rw-r--r-- | drivers/acpi/acpi_processor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 4fe2ef54088c..99c28b7307c3 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -381,6 +381,9 @@ static int acpi_processor_add(struct acpi_device *device, struct device *dev; int result = 0; + if (!acpi_device_is_enabled(device)) + return -ENODEV; + pr = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL); if (!pr) return -ENOMEM; |
