Re: [PATCH 1/2 #tj-percpu] x86: fix build breakage on voyage

From: James Bottomley
Date: Tue Jan 27 2009 - 10:31:53 EST

On Tue, 2009-01-27 at 12:37 +0100, Ingo Molnar wrote:
> * Tejun Heo <htejun@xxxxxxxxx> wrote:
> > From: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
> >
> > Impact: build fix
> >
> > x86_cpu_to_apicid and x86_bios_cpu_apicid aren't defined for voyage.
> > Earlier patch forgot to conditionalize early percpu clearing. Fix it.
> > +#ifdef CONFIG_X86_LOCAL_APIC
> > early_per_cpu_ptr(x86_cpu_to_apicid) = NULL;
> > early_per_cpu_ptr(x86_bios_cpu_apicid) = NULL;
> > +#endif
> That patch is not acceptable - it is ugly and it adds another set of
> #ifdefs to an already complex piece of code.
> As i explained it to James in recent threads, the clean and acceptable
> solution to this class of problems is to switch Voyager away from that
> fragile subarch code to proper generic x86 code. (just like we did it for
> other subarchitectures)
> There is nothing in Voyager that justifies special treatment in the area
> of x86 percpu code.
> This is one of the mails that explains the principles:
> Or - if there's no time/interest in doing that, we can mark Voyager as

Have you quite finished?

The problem isn't actually voyager specific ... the compile breaks if
you build UP with no local APIC ... for the same reason (you have apic
dependent variables in generic code). Whether voyager is converted to
your quirk infrastructure is irrelevant ... doubly so since the failure
can be produced with UP PC x86 which is already converted.

That file is already a forest of #ifdefs:

jejb@hobholes> grep \\#if setup_percpu.c
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_64
#if defined(CONFIG_X86_64) && defined(CONFIG_NUMA)

it can't but be otherwise because it's a monolithic initialisation of a
set of variables defined in conditionally compiled files.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at