diff options
author | James Morse <james.morse@arm.com> | 2023-02-24 17:26:37 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-10-30 12:22:24 +0000 |
commit | 408df9fc163678846810a4893ce7b44ec842efd4 (patch) | |
tree | 836dddd9457a7c59beebaf4f3e5c03c66036cdb2 /drivers/acpi/acpi_processor.c | |
parent | 8ff73528b3ecb5fd9a32aa3cc497423dc5d23767 (diff) |
ACPI: Only enumerate enabled (or functional) devices
Today the ACPI enumeration code 'visits' all devices that are present.
This is a problem for arm64, where CPUs are always present, but not
always enabled. When a device-check occurs because the firmware-policy
has changed and a CPU is now enabled, the following error occurs:
| acpi ACPI0007:48: Enumeration failure
This is ultimately because acpi_dev_ready_for_enumeration() returns
true for a device that is not enabled. The ACPI Processor driver
will not register such CPUs as they are not 'decoding their resources'.
Change acpi_dev_ready_for_enumeration() to also check the enabled bit.
ACPI allows a device to be functional instead of maintaining the
present and enabled bit. Make this behaviour an explicit check with
a reference to the spec, and then check the present and enabled bits.
This is needed to avoid enumerating present && functional devices that
are not enabled.
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
If this change causes problems on deployed hardware, I suggest an
arch opt-in: ACPI_IGNORE_STA_ENABLED, that causes
acpi_dev_ready_for_enumeration() to only check the present bit.
Changes since RFC v2:
* Incorporate comment suggestion by Gavin Shan.
Other review comments from Jonathan Cameron not yet addressed.
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
0 files changed, 0 insertions, 0 deletions