Re: [PATCH x86/percpu] x86_64: initialize this_cpu_off to __per_cpu_load
From: Tejun Heo
Date: Fri Jan 16 2009 - 08:48:00 EST
Ingo Molnar wrote:
>> +#ifdef CONFIG_X86_64
>> +DEFINE_PER_CPU(unsigned long, this_cpu_off) = (unsigned long)__per_cpu_load;
>> +#else
>> DEFINE_PER_CPU(unsigned long, this_cpu_off);
>> +#endif
>
> I've pulled your tree, but couldnt we do this symmetrically in the 32-bit
> case too and avoid the ugly #ifdef somehow?
You can take the "x86_32: make percpu symbols zerobased on SMP" patch
and the above ifdef won't be necessary along with similar one in
setup_percpu.c. The above ifdef is because 64 is zero based while 32
is not. If you want something, say, __per_cpu_base_off or something
to be defined conditionally and used in these two cases, I'm not sure
whether that would clean up the code or obfuscate it. :-)
Thanks.
--
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/