Re: [GIT RFC] percpu: use dynamic percpu allocator as the default percpu allocator

Tejun Heo
2009-03-11T06:04:01Z

Hello,

David Miller wrote:
> The one thing sparc64 does is calculate the base of the per-cpu
> area using a base (contained in a fixed global register) a shift.
>
>>From arch/sparc/include/asm/percpu_64.h
>
> register unsigned long __local_per_cpu_offset asm("g5");
> extern unsigned long __per_cpu_base;
> extern unsigned long __per_cpu_shift;
> #define __per_cpu_offset(__cpu) \
> (__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift))
> #define per_cpu_offset(x) (__per_cpu_offset(x))
> #define __my_cpu_offset __local_per_cpu_offset
>
> I hope this won't cause problems for what you're trying to accomplish.

It won't at all. I'll be converting the remaining three once the
default conversion is settled and I'm getting my very first sun
workstation this weekend, so no worries. :-)

Thanks.

--
tejun