Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Arnd Bergmann
On Wednesday 13 April 2016 18:13:00 Robin Murphy wrote: > Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed > accessor macros as conditional wrappers") makes the *_relaxed forms of > I/O accessors universally available to drivers, in cases where writeq() > is implemented via the io-64

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Will Deacon
On Mon, Apr 25, 2016 at 05:41:21PM +0200, Arnd Bergmann wrote: > On Monday 25 April 2016 16:28:01 Robin Murphy wrote: > > >>> > > >>> We _could_ - indeed I started doing that, but then decided that the > > >>> obfuscation of horrible macro-templated functions wasn't worth saving a > > >>> couple of

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Arnd Bergmann
On Monday 25 April 2016 16:28:01 Robin Murphy wrote: > >>> > >>> We _could_ - indeed I started doing that, but then decided that the > >>> obfuscation of horrible macro-templated functions wasn't worth saving a > >>> couple of hundred bytes in some code that isn't exactly difficult to > >>> maintai

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Robin Murphy
Hi Arnd, On 25/04/16 16:21, Arnd Bergmann wrote: On Monday 25 April 2016 14:32:42 Will Deacon wrote: +static inline __u64 hi_lo_readq_relaxed(const volatile void __iomem *addr) +{ + const volatile u32 __iomem *p = addr; + u32 low, high; + + high = readl_relaxed(p + 1); + low = readl_re

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Arnd Bergmann
On Monday 25 April 2016 14:32:42 Will Deacon wrote: > > >> > > >>+static inline __u64 hi_lo_readq_relaxed(const volatile void __iomem > > >>*addr) > > >>+{ > > >>+ const volatile u32 __iomem *p = addr; > > >>+ u32 low, high; > > >>+ > > >>+ high = readl_relaxed(p + 1); > > >>+ low = readl_

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-25 Thread Will Deacon
On Fri, Apr 22, 2016 at 06:08:46PM +0100, Robin Murphy wrote: > On 21/04/16 17:18, Will Deacon wrote: > >On Wed, Apr 13, 2016 at 06:13:00PM +0100, Robin Murphy wrote: > >>Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed > >>accessor macros as conditional wrappers") makes the *_relaxe

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-22 Thread Robin Murphy
On 21/04/16 17:18, Will Deacon wrote: On Wed, Apr 13, 2016 at 06:13:00PM +0100, Robin Murphy wrote: Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") makes the *_relaxed forms of I/O accessors universally available to drivers, in cases wher

Re: [PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-21 Thread Will Deacon
On Wed, Apr 13, 2016 at 06:13:00PM +0100, Robin Murphy wrote: > Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed > accessor macros as conditional wrappers") makes the *_relaxed forms of > I/O accessors universally available to drivers, in cases where writeq() > is implemented via the

[PATCH 4/7] io-64-nonatomic: Add relaxed accessor variants

2016-04-13 Thread Robin Murphy
Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") makes the *_relaxed forms of I/O accessors universally available to drivers, in cases where writeq() is implemented via the io-64-nonatomic helpers, writeq_relaxed() will end up falling back to