Re: WARNING: at arch/x86/kernel/apic/apic.c:1239setup_local_APIC+...

From: Tejun Heo
Date: Fri Oct 14 2011 - 13:56:02 EST


Hello,

(cc'ing Jan Beulich)

On Fri, Oct 14, 2011 at 06:56:04PM +0200, Borislav Petkov wrote:
> On Fri, Oct 14, 2011 at 09:55:16AM -0400, Borislav Petkov wrote:
> > So, in the end, and AFAICR, the warning triggers because we're comparing
> > logical APIC IDs from the APIC Logical Destination Register (0xD0) which
> > have been assigned by BIOS with "1 << cpu" shifted values which wrap on
> > 32-bit.
> >
> > I'd very much like to know why?
>
> Update: upon a second thought, we think we know why: The WARN_ON
> cannot stomach the switch to bigsmp apic because, on the one hand,
> bigsmp_init_apic_ldr() "normalizes" the APIC ids by using the BIOS
> values (x86_bios_cpu_apicid) but OTOH, x86_cpu_to_logical_apicid
> contains the early percpu value which got assigned by the default apic,
> i.e. the shifting thing as it is spec'ed for the LDR register.
>
> So, the way we see it, the WARN_ON should know whether we switched apics
> or should be removed completely. Btw, why was it added in the first
> place, the commit message doesn't quite explain why.

Jan hit similar problem a while back.

http://thread.gmane.org/gmane.linux.kernel/1180954

I can't seem to find the patch in mainline. Jan, Ingo? Borislav,
would the patch there resolve the warning you're seeing too?

Anyways, to summarize, the early apic thing isn't necessary anymore
and can be ripped out and the warning is pretty much bogus at this
point. I'll rip it out soonish.

Thank you.

--
tejun
--
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/