public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Puthukattukaran <james.puthukattukaran@oracle.com>
To: linux-acpi@vger.kernel.org, x86@kernel.org
Cc: rafael@kernel.org, lenb@kernel.org, mingo@redhat.com,
	tglx@linutronix.de, bp@alien8.de, hpa@zytor.com
Subject: Re: [PATCH v3] x86/ACPI: Ignore CPUs that are not online capable for x2apic, entries as well
Date: Tue, 10 Jan 2023 17:43:41 -0500	[thread overview]
Message-ID: <1987c2d2-1246-b172-985f-360e5c2c437a@oracle.com> (raw)
In-Reply-To: <ef8c7138-8ed1-d849-0ed5-e629ddcafd63@oracle.com>

Adding others that I missed on my first email. 

James

On 12/22/22 13:26, James Puthukattukaran wrote:
> Extending commit aa06e20f1be6 ("x86/ACPI: Don't add CPUs that are not
> online capable") to include acpi_parse_x2apic as well. There is a check
> for invalid apicid; however, there are BIOS FW with madt version >= 5
> support that do not bother setting apic id to an invalid value since they
> assume the OS will check the enabled and online capable flags.
> 
> Signed-off-by: James Puthukattukaran<james.puthukattukaran@oracle.com>
> Reported-by: Benjamin Fuller<ben.fuller@oracle.com>
> 
> v2 : use 'enabled' local variable. Also fix checkpatch.pl catches
> v3 : updates as per Rafael's comments
> ---
>  arch/x86/kernel/acpi/boot.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 907cc98b1938..cf2509f9de31 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -208,7 +208,15 @@ acpi_parse_x2apic(union acpi_subtable_headers *header, const unsigned long end)
>  	apic_id = processor->local_apic_id;
>  	enabled = processor->lapic_flags & ACPI_MADT_ENABLED;
>  
> -	/* Ignore invalid ID */
> +	/* don't register processors that can not be onlined */
> +	if (!enabled && acpi_support_online_capable &&
> +	    !(processor->lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
> +		return 0;
> +
> +	/*
> +	 * for systems older than madt version 5 (does not have
> +	 * ACPI_MADT_ONLINE_CAPABLE defined); ignore invalid ID
> +	 */
>  	if (apic_id == 0xffffffff)
>  		return 0;
>  

  reply	other threads:[~2023-01-10 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 18:26 [PATCH v3] x86/ACPI: Ignore CPUs that are not online capable for x2apic, entries as well James Puthukattukaran
2023-01-10 22:43 ` James Puthukattukaran [this message]
2023-01-10 23:24   ` Borislav Petkov
2023-01-11  9:48     ` Rafael J. Wysocki
2023-01-11  9:44 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1987c2d2-1246-b172-985f-360e5c2c437a@oracle.com \
    --to=james.puthukattukaran@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox