Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-28 Thread Will Deacon
On Mon, Oct 27, 2014 at 10:14:41PM +, Mathieu Poirier wrote: > On 27 October 2014 09:54, Will Deacon wrote: > > On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: > >> As I said, it's confusing. Anyway, you can go ahead and add the > >> readq/writeq for ARMv6 and later, though

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-28 Thread Will Deacon
On Mon, Oct 27, 2014 at 10:14:41PM +, Mathieu Poirier wrote: On 27 October 2014 09:54, Will Deacon will.dea...@arm.com wrote: On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: As I said, it's confusing. Anyway, you can go ahead and add the readq/writeq for ARMv6 and

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-27 Thread Mathieu Poirier
On 27 October 2014 09:54, Will Deacon wrote: > On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: >> On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: >> > On 24 October 2014 03:28, Catalin Marinas wrote: >> > > On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-27 Thread Will Deacon
On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: > On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: > > On 24 October 2014 03:28, Catalin Marinas wrote: > > > On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: > > >> On 22 October 2014 18:44, Catalin

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-27 Thread Will Deacon
On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: On 24 October 2014 03:28, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: On 22 October 2014

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-27 Thread Mathieu Poirier
On 27 October 2014 09:54, Will Deacon will.dea...@arm.com wrote: On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote: On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: On 24 October 2014 03:28, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Mathieu Poirier
On 24 October 2014 10:16, Catalin Marinas wrote: > On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: >> On 24 October 2014 03:28, Catalin Marinas wrote: >> > On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: >> >> On 22 October 2014 18:44, Catalin Marinas wrote: >>

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: > On 24 October 2014 03:28, Catalin Marinas wrote: > > On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: > >> On 22 October 2014 18:44, Catalin Marinas wrote: > >> > On Wed, Oct 22, 2014 at 05:06:23PM +0100,

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Mathieu Poirier
On 24 October 2014 03:28, Catalin Marinas wrote: > On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: >> On 22 October 2014 18:44, Catalin Marinas wrote: >> > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: >> >> +static inline void __raw_writeq(u64 val,

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Arnd Bergmann
On Thursday 23 October 2014 16:15:19 Nicolas Pitre wrote: > On Thu, 23 Oct 2014, Russell King - ARM Linux wrote: > > > On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: > > > On Wed, 22 Oct 2014, Catalin Marinas wrote: > > > > > > > On Wed, Oct 22, 2014 at 05:06:23PM +0100,

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: > On 22 October 2014 18:44, Catalin Marinas wrote: > > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: > >> +static inline void __raw_writeq(u64 val, volatile void __iomem *addr) > >> +{ > >> + asm

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Thu, Oct 23, 2014 at 08:47:32PM +0100, Nicolas Pitre wrote: > On Wed, 22 Oct 2014, Catalin Marinas wrote: > > > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: > > > +#if __LINUX_ARM_ARCH__ >= 5 > > > > My old ARMv5 book does not list LDRD/STRD. It looks like they

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Thu, Oct 23, 2014 at 08:47:32PM +0100, Nicolas Pitre wrote: On Wed, 22 Oct 2014, Catalin Marinas wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: On 22 October 2014 18:44, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +static inline void __raw_writeq(u64 val, volatile void __iomem *addr) +{ +

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Arnd Bergmann
On Thursday 23 October 2014 16:15:19 Nicolas Pitre wrote: On Thu, 23 Oct 2014, Russell King - ARM Linux wrote: On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: On Wed, 22 Oct 2014, Catalin Marinas wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100,

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Mathieu Poirier
On 24 October 2014 03:28, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: On 22 October 2014 18:44, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote:

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Catalin Marinas
On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: On 24 October 2014 03:28, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: On 22 October 2014 18:44, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-24 Thread Mathieu Poirier
On 24 October 2014 10:16, Catalin Marinas catalin.mari...@arm.com wrote: On Fri, Oct 24, 2014 at 04:05:13PM +0100, Mathieu Poirier wrote: On 24 October 2014 03:28, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 08:10:27PM +0100, Mathieu Poirier wrote: On 22 October

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Nicolas Pitre
On Thu, 23 Oct 2014, Russell King - ARM Linux wrote: > On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: > > On Wed, 22 Oct 2014, Catalin Marinas wrote: > > > > > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org > > > wrote: > > > > +#if __LINUX_ARM_ARCH__ >= 5

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Russell King - ARM Linux
On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: > On Wed, 22 Oct 2014, Catalin Marinas wrote: > > > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: > > > +#if __LINUX_ARM_ARCH__ >= 5 > > > > My old ARMv5 book does not list LDRD/STRD. It looks like they

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Nicolas Pitre
On Wed, 22 Oct 2014, Catalin Marinas wrote: > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: > > +#if __LINUX_ARM_ARCH__ >= 5 > > My old ARMv5 book does not list LDRD/STRD. It looks like they only come > with ARMv5TE. Are there any processors prior to this supported

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Nicolas Pitre
On Wed, 22 Oct 2014, Catalin Marinas wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come with ARMv5TE. Are there any processors prior to this supported by the

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Russell King - ARM Linux
On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: On Wed, 22 Oct 2014, Catalin Marinas wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-23 Thread Nicolas Pitre
On Thu, 23 Oct 2014, Russell King - ARM Linux wrote: On Thu, Oct 23, 2014 at 03:47:32PM -0400, Nicolas Pitre wrote: On Wed, 22 Oct 2014, Catalin Marinas wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 18:44, Catalin Marinas wrote: > On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: >> +#if __LINUX_ARM_ARCH__ >= 5 > > My old ARMv5 book does not list LDRD/STRD. It looks like they only come > with ARMv5TE. Are there any processors prior to this

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 19:19, Russell King - ARM Linux wrote: > On Wed, Oct 22, 2014 at 06:22:09PM +0200, Mathieu Poirier wrote: >> I had this conversation with a colleague who reviewed the work. If >> the architecture is < 5 the __raw_ versions aren't included and the >> compiler won't complain

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Russell King - ARM Linux
On Wed, Oct 22, 2014 at 06:22:09PM +0200, Mathieu Poirier wrote: > I had this conversation with a colleague who reviewed the work. If > the architecture is < 5 the __raw_ versions aren't included and the > compiler won't complain until someone tries to use the macros. We > achieve the same

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Catalin Marinas
On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: > +#if __LINUX_ARM_ARCH__ >= 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come with ARMv5TE. Are there any processors prior to this supported by the kernel? > +static inline void __raw_writeq(u64

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 18:11, Russell King - ARM Linux wrote: > On Wed, Oct 22, 2014 at 10:06:23AM -0600, mathieu.poir...@linaro.org wrote: >> @@ -306,10 +324,13 @@ extern void _memset_io(volatile void __iomem *, int, >> size_t); >> __raw_readw(c)); __r; }) >>

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Russell King - ARM Linux
On Wed, Oct 22, 2014 at 10:06:23AM -0600, mathieu.poir...@linaro.org wrote: > @@ -306,10 +324,13 @@ extern void _memset_io(volatile void __iomem *, int, > size_t); > __raw_readw(c)); __r; }) > #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force

[PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread mathieu . poirier
From: Mathieu Poirier Some drivers on ARMv7 need 64 bit read and writes. Signed-off-by: Mathieu Poirier --- arch/arm/include/asm/io.h | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 1805674..861e52c 100644

[PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread mathieu . poirier
From: Mathieu Poirier mathieu.poir...@linaro.org Some drivers on ARMv7 need 64 bit read and writes. Signed-off-by: Mathieu Poirier mathieu.poir...@linaro.org --- arch/arm/include/asm/io.h | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/include/asm/io.h

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Russell King - ARM Linux
On Wed, Oct 22, 2014 at 10:06:23AM -0600, mathieu.poir...@linaro.org wrote: @@ -306,10 +324,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t); __raw_readw(c)); __r; }) #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 18:11, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Wed, Oct 22, 2014 at 10:06:23AM -0600, mathieu.poir...@linaro.org wrote: @@ -306,10 +324,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t);

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Catalin Marinas
On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come with ARMv5TE. Are there any processors prior to this supported by the kernel? +static inline void __raw_writeq(u64

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Russell King - ARM Linux
On Wed, Oct 22, 2014 at 06:22:09PM +0200, Mathieu Poirier wrote: I had this conversation with a colleague who reviewed the work. If the architecture is 5 the __raw_ versions aren't included and the compiler won't complain until someone tries to use the macros. We achieve the same result -

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 19:19, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Wed, Oct 22, 2014 at 06:22:09PM +0200, Mathieu Poirier wrote: I had this conversation with a colleague who reviewed the work. If the architecture is 5 the __raw_ versions aren't included and the compiler

Re: [PATCH] ARM: supplementing IO accessors with 64 bit capability

2014-10-22 Thread Mathieu Poirier
On 22 October 2014 18:44, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 05:06:23PM +0100, mathieu.poir...@linaro.org wrote: +#if __LINUX_ARM_ARCH__ = 5 My old ARMv5 book does not list LDRD/STRD. It looks like they only come with ARMv5TE. Are there any processors prior