[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7aff0a4a-369e-6278-873b-eaad6c51d024@amd.com>
Date: Wed, 29 Mar 2023 14:35:41 -0500
From: "Limonciello, Mario" <mario.limonciello@....com>
To: Eric DeVolder <eric.devolder@...cle.com>, rafael@...nel.org,
lenb@...nel.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, kvijayab@....com
Cc: miguel.luis@...cle.com, boris.ostrovsky@...cle.com
Subject: Re: [PATCH 1/1] x86/acpi: acpi_is_processor_usable() dropping
possible cpus
On 3/27/2023 14:10, Eric DeVolder wrote:
> The logic in acpi_is_processor_usable() requires the Online Capable
> bit be set for hotpluggable cpus. The Online Capable bit is
> introduced in ACPI 6.3 and MADT.revision 5.
>
> However, as currently coded, for MADT.revision < 5,
> acpi_is_processor_usable() no longer allows for possible hot
> pluggable cpus, which is a regressive change in behavior.
>
> This patch restores the behavior where for MADT.revision < 5, the
> presence of the lapic/x2apic structure implies a possible hotpluggable
> cpu.
>
> Fixes: e2869bd7af60 ("x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC")
> Suggested-by: Miguel Luis <miguel.luis@...cle.com>
> Suggested-by: Boris Ostrovsky <boris.ovstrosky@...cle.com>
> Signed-off-by: Eric DeVolder <eric.devolder@...cle.com>
> ---
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Tested-by: David R <david@...olicited.net>
Link:
https://lore.kernel.org/all/a15c6a64-dcd7-b102-9d9f-0225dfa1172b@unsolicited.net/T/
> arch/x86/kernel/acpi/boot.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 1c38174b5f01..7b5b8ed018b0 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -193,7 +193,13 @@ static bool __init acpi_is_processor_usable(u32 lapic_flags)
> if (lapic_flags & ACPI_MADT_ENABLED)
> return true;
>
> - if (acpi_support_online_capable && (lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
> + /*
> + * Prior to MADT.revision 5, the presence of the Local x2/APIC
> + * structure _implicitly_ noted a possible hotpluggable cpu.
> + * Starting with MADT.revision 5, the Online Capable bit
> + * _explicitly_ indicates a hotpluggable cpu.
> + */
> + if (!acpi_support_online_capable || (lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
> return true;
>
> return false;
Powered by blists - more mailing lists