[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201203072259.06012.arnd@arndb.de>
Date: Wed, 7 Mar 2012 22:59:05 +0000
From: Arnd Bergmann <arnd@...db.de>
To: David Howells <dhowells@...hat.com>
Cc: paul.gortmaker@...driver.com, hpa@...or.com,
torvalds@...ux-foundation.org, sfr@...b.auug.org.au,
mingo@...hat.com, tglx@...utronix.de, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: Re: [RFC][PATCH 00/29] Disintegrate and kill asm/system.h
On Wednesday 07 March 2012, David Howells wrote:
> Arnd Bergmann <arnd@...db.de> wrote:
>
> > One part you were missing seems to be include/asm-generic/system.h, which is
> > used on openrisc and contains a lot of the things you move to other
> > places. It would be helpful to split that up as well.
>
> Hmmm... okay. How that is used from an arch that doesn't have an
> asm/system.h?
We're migration towards using generic-y in arch/*/include/arm/Kbuild now.
When you create header files that have reasonable defaults that can be
shared across multiple architectures, I think you should do that for the
new header files as well.
> > > (4) asm/atomic.h
> > >
> > > Move xchg() and cmpxchg() here as they're full word atomic ops and
> > > frequently used by atomic_xchg() and atomic_cmpxchg().
> >
> > Well, the thing with xchg and cmpxchg is that they operate on arbirary-sized
> > integers, not atomic_t, unlike everything else in atomic.h.
> >
> > Some architectures already have an asm/cmpxchg.h, which seems more appropriate
> > here.
>
> So I saw. It might be worth making an asm/xchg.h and asm/cmpxchg.h for each
> arch - or maybe just put both in asm/xchg.h or asm/cmpxchg.h. Where do I
> include it from though? One nice thing about sticking them in asm/atomic.h is
> that usually gets all instances, and they're frequently used from there. How
> about I have asm/atomic.h #include asm/{,cmp}xchg.h?
Yes, that makes sense and is probably required anyway for the obvious implementation
of atomic_cmpxchg().
Arnd
--
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