Re: Re: [PATCH] x86/srat: Conditional apic_id vs MAX_LOCAL_APIC comparison
From: WangYuli
Date: Sun Mar 02 2025 - 22:47:22 EST
Hi Ingo,
The commit message already clearly explains that, uniquely,
acpi_numa_processor_affinity_init() utilizes the apic_id from the
acpi_srat_cpu_affinity struct, which is typed as u8 rather than u32.
The apic_id becomes (pa->apic_id << 8) | pa->local_sapic_eid if and
only if CONFIG_X86_X2APIC is enabled; otherwise, it remains pa->apic_id.
Consequently, even with apic_id being of type int, its maximum value is
still constrained to 255.
Thanks,
--
WangYuli