Re: [PATCH] linux-2.5.69_subarch-fix_A0.patch

john stultz (johnstul@us.ibm.com)
15 May 2003 10:20:59 -0700


On Wed, 2003-05-14 at 23:51, Andi Kleen wrote:
> On Wed, May 14, 2003 at 07:37:09PM -0700, john stultz wrote:
> > All,
> > This patch fixes a circular dependency (a function in mach_apic.h
> > requires hard_smp_processor_id() and hard_smp_processor_id() requires
> > macros from mach_apic.h) that has been in the subarch code for a bit,
> > but was hacked around with some #ifdefs.
> >
> > With the inclusion of the generic-subarch the hack was dropped and
> > bigsmp and summit promptly broke. So this makes things compile again.
>
> What broke exactly? I thought worked around this problem for the generic
> subarchitecture.

GET_APIC_ID was moved into mach_apic.h (it used to be wrapped in
CONFIG_X86_SUMMIT in apicdef.h). However, init_apic_ldr() in
mach_apic.h uses hard_smp_processor_id() (in smp.h), which to complete
the circle, requires GET_APIC_ID from mach_apic.h

You did get around it in the generic subarch (which I love, by the way,
thanks so much for doing that work), but in a roundabout way. (via
#ifdef APIC_DEFINITION trickery).

> Accessing the APIC directly this way just to work around a bad include
> looks quite ugly to me.

Yea, ok. I guess we can move GET_APIC_ID out into its own mach specific
.h file. That will eliminate the circularity as well. I'll respin the
patch later today.

thanks
-john

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