[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090415164929.GA10345@elte.hu>
Date: Wed, 15 Apr 2009 18:49:29 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Howells <dhowells@...hat.com>, tj@...nel.org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] FRV: Fix the section attribute on UP DECLARE_PER_CPU()
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Wed, 15 Apr 2009, David Howells wrote:
> > Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> >
> > > Hmm. Why not move it all above the '#include <asm/percpu.h>'?
> >
> > There are circular dependencies between the x86 arch headers that both use
> > this and are used to implement this, and it's a bit fragile.
>
> Grr. Indeed it seems to be. Nasty. Header files seem to want that
> DECLARE_PER_CPU() thing without all the other baggage that is
> implied by including all of <linux/percpu.h>, so they just include
> <asm/percpu.h> directly instead.
>
> What a mess.
>
> So maybe we could move DEFINE_PER_CPU in there too? It's less than
> perfect, but at least we'd have things together rather than split
> in really odd ways.
I think splitting the type related defines away into percpu_types.h,
and updating the lowlevel headers to include linux/percpu_types.h
[which would include asm/percpu.h] would do the trick.
Even the exising percpu.h could be made lighter:
slab.h: is needed for the kzalloc in the !SMP wrapper case. That
could be eliminated by uninlining the UP wrappers.
preempt.h: is needed for preempt_disable/enable() in the
get_cpu_var()/put_cpu_var() methods.
smp.h: not sure what it's needed for - nothing obvious at first
sight.
Most of them could be eliminated.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists