Re: [PATCH] unbreak alpha percpu

Ingo Molnar
2009-04-10T19:36:24Z

* Tejun Heo <tj@kernel.org> wrote:

> Long term, I think what Ivan proposed with a bit of addition so
> that combination of DECLARE_PER_CPU() and static DEFINE_PER_CPU()
> triggers compile error but I think it's better to do it when
> converting non-x86 archs to dynamic percpu allocator which is
> scheduled for the next merge window. For the time being, how
> about just moving the generic percpu_*() accessors to
> linux/percpu.h? asm-generic/percpu.h is meant to carry generic
> stuff for low level stuff - declarations, definitions and pointer
> offset calculation and so on but not for generic interface.
>
> I currently can't build or test stuff so the patch is not tested
> at all. Ingo, can you please test whether this would work?

Yes - but i'm somewhat confused - i frequently cross-built Alpha and
other architectures as well.

So exactly what problem do we have here - has some devel tree grown
new use of these APIs in generic code, without waiting for all
arches to be properly converted?

(sounds of rummaging around)

Oh drat:

| commit 4e69489a0ac11a9b62a25923975bfc370a30eae5
| Author: Eric Dumazet <dada1@cosmosbay.com>
| Date: Sat Apr 4 16:41:09 2009 -0700
|
| socket: use percpu_add() while updating sockets_in_use

Now i understand the rush ...

Yes, moving the APIs to the generic header should properly expose
the wrapped default implementations. I'll test your patch in a
minute.

Ingo