[PATCH v10 14/19] irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs
Marc Zyngier
maz at kernel.org
Wed Jun 19 05:10:36 PDT 2024
On Wed, 29 May 2024 14:34:41 +0100,
Jonathan Cameron <Jonathan.Cameron at huawei.com> wrote:
>
> From: James Morse <james.morse at arm.com>
>
> 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 redistributor is one that is marked as
> either enabled, or online capable. The meaning of the
> acpi_gicc_is_usable() would become less clear than just checking the
> pair of flags at call sites. As such, drop that helper function.
> The test in gic_acpi_match_gicc() remains as 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.
> Rather than modifying cpu masks that may already have been used,
> register a new cpuhp callback to fail this case. This must run earlier
> than the main gic_starting_cpu() so that this case can be rejected
> before the section of cpuhp that runs on the CPU that is coming up as
> that is not allowed to fail. This solution keeps the handling of this
> broken firmware corner case local to the GIC driver. As precise ordering
> of this callback doesn't need to be controlled as long as it is
> in that initial prepare phase, use CPUHP_BP_PREPARE_DYN.
>
> 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.
>
> Suggested-by: Marc Zyngier <maz at kernel.org>
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
> Tested-by: Miguel Luis <miguel.luis at oracle.com>
> Co-developed-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
Acked-by: Marc Zyngier <maz at kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list