From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
tony.luck@intel.com, x86@kernel.org, avadhut.naik@amd.com,
john.allen@amd.com
Subject: Re: [PATCH v2 1/5] x86/topology: Export helper to get CPU number from APIC ID
Date: Fri, 12 Jul 2024 10:28:21 -0400 [thread overview]
Message-ID: <20240712142821.GA10846@yaz-khff2.amd.com> (raw)
In-Reply-To: <20240701190704.GKZoL-WBZ19-z8s7UR@fat_crate.local>
On Mon, Jul 01, 2024 at 09:07:04PM +0200, Borislav Petkov wrote:
> On Mon, Jul 01, 2024 at 01:51:42PM -0400, Yazen Ghannam wrote:
> > X86_LOCAL_APIC depends on the logical OR of a bunch of options. So it
> > depends on "any one" of the options to be enabled. But it doesn't need
> > all of them.
>
> Yes, I can see that.
>
> How does any of that info answer your initial question?
>
> IOW, if you don't have LAPIC support in the kernel, what CPU number should we
> return for any APIC ID serving as input, and why?
>
I still think it should return an error code, because theoretically
LAPIC can be disabled and SMP can be enabled.
But I spent some time trying to see if this would work in practice, and
it looks like you can't disable X86_LOCAL_APIC without hitting a bunch
of build errors on x86_64. It seems like a lot of common APIC and SMP
code implicitly depends on X86_LOCAL_APIC. This was true even for a tiny
config. However, this worked for an i386 build (with SMP=n).
I think the most practical option is to keep the local search routine in
mce/apei. I don't think all the additional complexity is worth it for a
simple for-loop.
Regarding the X86_LOCAL_APIC=n build issues, should these be
investigated?
Thanks,
Yazen
next prev parent reply other threads:[~2024-07-12 14:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 21:20 [PATCH v2 0/5] Rework mce_setup() Yazen Ghannam
2024-06-24 21:20 ` [PATCH v2 1/5] x86/topology: Export helper to get CPU number from APIC ID Yazen Ghannam
2024-06-25 6:50 ` Thomas Gleixner
2024-06-26 1:42 ` Yazen Ghannam
2024-06-28 8:37 ` Borislav Petkov
2024-06-28 14:15 ` Yazen Ghannam
2024-06-28 14:45 ` Borislav Petkov
2024-07-01 17:51 ` Yazen Ghannam
2024-07-01 19:07 ` Borislav Petkov
2024-07-12 14:28 ` Yazen Ghannam [this message]
2024-06-24 21:20 ` [PATCH v2 2/5] x86/mce: Fixup APIC ID search for x86 CPER decoding Yazen Ghannam
2024-06-25 6:50 ` Thomas Gleixner
2024-06-26 1:44 ` Yazen Ghannam
2024-06-24 21:20 ` [PATCH v2 3/5] x86/mce: Rename mce_setup() to mce_prep_record() Yazen Ghannam
2024-06-24 21:20 ` [PATCH v2 4/5] x86/mce: Define mce_prep_record() helpers for common and per-CPU fields Yazen Ghannam
2024-06-25 13:19 ` Nikolay Borisov
2024-06-26 1:45 ` Yazen Ghannam
2024-06-24 21:20 ` [PATCH v2 5/5] x86/mce: Use mce_prep_record() helpers for apei_smca_report_x86_error() Yazen Ghannam
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=20240712142821.GA10846@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--cc=john.allen@amd.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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