summaryrefslogtreecommitdiff
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-07-05 11:37:09 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-01-30 10:57:29 +0000
commit06508ce9a29cf6a9aaffbffaa4043bbf383be648 (patch)
tree089ecafed32036b46b168a879dfbb95007dd3969 /include/linux/acpi.h
parent661531355a57eefa0a1c89c3487d229fdb9d94a0 (diff)
irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs
To support virtual CPU hotplug, ACPI has added an 'online capable' bit to the MADT GICC entries. This indicates a disabled CPU entry may not be possible to online via PSCI until firmware has set enabled bit in _STA. This means that a "usable" GIC is one that is marked as either enabled, or online capable. Therefore, change acpi_gicc_is_usable() to check both bits. However, we need to change the test in gic_acpi_match_gicc() back to testing just the enabled bit so the count of enabled distributors is correct. What about the redistributor in the GICC entry? ACPI doesn't want to say. Assume the worst: When a redistributor is described in the GICC entry, but the entry is marked as disabled at boot, assume the redistributor is inaccessible. The GICv3 driver doesn't support late online of redistributors, so this means the corresponding CPU can't be brought online either. Clear the possible and present bits. Systems that want CPU hotplug in a VM can ensure their redistributors are always-on, and describe them that way with a GICR entry in the MADT. When mapping redistributors found via GICC entries, handle the case where the arch code believes the CPU is present and possible, but it does not have an accessible redistributor. Print a warning and clear the present and possible bits. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> ---- Disabled but online-capable CPUs cause this message to be printed if their redistributors are described via GICC: | GICv3: CPU 3's redistributor is inaccessible: this CPU can't be brought online If ACPI's _STA tries to make the cpu present later, this message is printed: | Changing CPU present bit is not supported Changes since RFC v2: * use gicc->flags & (ACPI_MADT_ENABLED | ACPI_MADT_GICC_CPU_CAPABLE) Changes since RFC v3 (smaller series): * Update ACPI_MADT_GICC_CPU_CAPABLE to ACPI_MADT_GICC_ONLINE_CAPABLE as per Lorenzo's ACPICA pull request. * Move acpi_gicc_is_usable() change in gic_acpi_match_gicc() into this patch from the previous one, and update the commit message to describe this change.
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 76ad43f7860b..cf018d42e632 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -239,7 +239,8 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
static inline bool acpi_gicc_is_usable(struct acpi_madt_generic_interrupt *gicc)
{
- return gicc->flags & ACPI_MADT_ENABLED;
+ return gicc->flags & (ACPI_MADT_ENABLED |
+ ACPI_MADT_GICC_ONLINE_CAPABLE);
}
/* the following numa functions are architecture-dependent */