Re: [PATCH 2/5] percpu: Refactor percpu.h
From: Brian Gerst
Date: Fri Feb 06 2009 - 06:11:59 EST
On Thu, Feb 5, 2009 at 5:30 PM, Tony Luck <tony.luck@xxxxxxxxx> wrote:
> On Sun, Jan 18, 2009 at 4:52 PM, Brian Gerst <brgerst@xxxxxxxxx> wrote:
>> Refactor the DEFINE_PER_CPU_* macros and add .data.percpu.first
>> section.
>>
>> Signed-off-by: Brian Gerst <brgerst@xxxxxxxxx>
>
>> diff --git a/include/linux/percpu.h b/include/linux/percpu.h
>> index 9f2a375..0e24202 100644
>> --- a/include/linux/percpu.h
>> +++ b/include/linux/percpu.h
> ...
>
>> +#define DEFINE_PER_CPU_SECTION(type, name, section) \
>> + __attribute__((__section__(PER_CPU_BASE_SECTION section))) \
>> PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
>
> Brian,
>
> This causes errors for CONFIG_SMP=n builds on ia64. If you look
> at arch/ia64/include/asm/percpu.h you'll see that the !SMP case has
>
>
> #define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
>
> So we end up with section attributes of both ".data" and
> ".data.percpu" for every
> DEFINE_PER_CPU used. The compiler doesn't like that at all :-(
>
>
> Perhaps PER_CPU_BASE_SECTION needs to be defined by <asm/percpu.h>
> so ia64 can avoid the section conflict?
>
> -Tony
>
Why does IA64 still have a special percpu section on UP? Is there a
particular reason why it can't degenerate to regular .data like every
other arch?
--
Brian Gerst
--
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/