Re: [tip:x86/urgent] x86: Detect use of extended APIC ID for AMDCPUs
From: Andreas Herrmann
Date: Mon Jun 08 2009 - 08:19:20 EST
On Sun, Jun 07, 2009 at 11:46:51AM -0700, Yinghai Lu wrote:
> tip-bot for Andreas Herrmann wrote:
> > diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> > index 42f2f83..9b2c049 100644
> > --- a/arch/x86/include/asm/apic.h
> > +++ b/arch/x86/include/asm/apic.h
> > @@ -410,7 +410,7 @@ static inline unsigned default_get_apic_id(unsigned long x)
> > {
> > unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
> >
> > - if (APIC_XAPIC(ver))
> > + if (APIC_XAPIC(ver) || boot_cpu_has(X86_FEATURE_EXTD_APICID))
> > return (x >> 24) & 0xFF;
> > else
> > return (x >> 24) & 0x0F;
>
> looks like we should fix APIC_XAPIC() or have one global apic_ver.
I thought to set the new flag for Intel as well and to replace
APIC_XAPIC with checks for that flag. But for some reason this was
ugly as lapic access must be configured before you can check the
APIC_VERSION and so I decided to keep Intel code as is and not to
potentially introduce regresions.
Regards,
Andreas
--
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/