Re: [PATCH] Move APIC ID validity check into platform APIC code

From: Yinghai Lu
Date: Wed Mar 14 2012 - 19:19:40 EST


On Wed, Mar 14, 2012 at 1:18 PM, Steffen Persvold <sp@xxxxxxxxxxxxx> wrote:
> which, as you can see, checks against "x2apic_mode".
>
> My question is; Is checking for "x2apic_mode" going to do the trick in the
> arch/x86/kernel/acpi/boot.c::acpi_parse_x2apic() ?

no, it is too early.

at that time, only x2apic pre-enabled system have that x2apic_mode set.

>
> If the answer is yes, the patch is going to be very simple. But we can't
> verify that the code in arch/x86/kernel/acpi/boot.c::acpi_parse_x2apic()
> actually triggers for the case you wanted it to trigger for because then it
> will check against "x2apic_mode" and not "cpu_has_x2apic".

when kernel, found pre-enabled x2apic, can not use x2apic for some
reason (like x2apic)
it will clear x2apic in cpu feature bit.

for other case like x2apic capable cpus and not preenabled,
but not have dmar table, that feature is not cleared if the not apic id > 255.

So we have default apic_id_valid only check cpu_has_x2apic instead of
x2apic_mode instead.
and use it in boot.c

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/