Re: [patch 41/58] x86/apic: Add max_apic_id member

From: Linus Torvalds
Date: Mon Jul 17 2023 - 20:20:04 EST


So all of your patches make sense to me, but the whole apic_flat case
confuses me.

On Mon, 17 Jul 2023 at 16:15, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> --- a/arch/x86/kernel/apic/apic_flat_64.c
> +++ b/arch/x86/kernel/apic/apic_flat_64.c
> @@ -94,6 +94,7 @@ static struct apic apic_flat __ro_after_
> .cpu_present_to_apicid = default_cpu_present_to_apicid,
> .phys_pkg_id = flat_phys_pkg_id,
>
> + .max_apic_id = 0xFE,
> .get_apic_id = flat_get_apic_id,
> .set_apic_id = set_apic_id,

flat_send_IPI_mask() can only deal with a single word mask. How the
heck can the max apic ID be more than 64?

I'm probably very confused.

Which is what the APIC code would do to anybody, which is why I'm
cheering your patch series on despite (or maybe _because_) it confuses
me.

Linus