Re: [PATCH] arc: use little endian accesses

2016-03-11 Thread Vineet Gupta
On Friday 11 March 2016 06:14 PM, Vineet Gupta wrote: > @Lada I will fix up the changelog to add some of the background behind this > change, and mark this for stable backport as well. This is what I'm planning to add. Noam please give this a spin - you might have to revert those native-endian DT

Re: [PATCH] arc: use little endian accesses

2016-03-11 Thread Vineet Gupta
On Friday 11 March 2016 06:14 PM, Vineet Gupta wrote: > @Lada I will fix up the changelog to add some of the background behind this > change, and mark this for stable backport as well. This is what I'm planning to add. Noam please give this a spin - you might have to revert those native-endian DT

Re: [PATCH] arc: use little endian accesses

2016-03-11 Thread Vineet Gupta
On Friday 11 March 2016 12:54 AM, Arnd Bergmann wrote: > On Thursday 10 March 2016, Lada Trimasova wrote: >> Driver is 8250, kernel is built for BE arc, nsim option in model >> "nsim_isa_big_endian = 1". >> >> With current "readl" and "writel" implementation for ARC we read word from >> memory

Re: [PATCH] arc: use little endian accesses

2016-03-11 Thread Vineet Gupta
On Friday 11 March 2016 12:54 AM, Arnd Bergmann wrote: > On Thursday 10 March 2016, Lada Trimasova wrote: >> Driver is 8250, kernel is built for BE arc, nsim option in model >> "nsim_isa_big_endian = 1". >> >> With current "readl" and "writel" implementation for ARC we read word from >> memory

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Noam Camus
> From: Lada Trimasova > Sent: Thursday, March 10, 2016 8:57 PM > And for example, let's see what happens when we use "readl" in function > "serial8250_early_in" in driver/tty/serial/8250. Is your DTS entry includes for serial node following entries: reg-io-width

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Noam Camus
> From: Lada Trimasova > Sent: Thursday, March 10, 2016 8:57 PM > And for example, let's see what happens when we use "readl" in function > "serial8250_early_in" in driver/tty/serial/8250. Is your DTS entry includes for serial node following entries: reg-io-width = <4> native-endian; if

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Vineet Gupta
On Thursday 10 March 2016 01:15 PM, Arnd Bergmann wrote: > On Thursday 10 March 2016, Vineet Gupta wrote: >> On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: >>> Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu >>> and le32_to_cpu because it is not really

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Vineet Gupta
On Thursday 10 March 2016 01:15 PM, Arnd Bergmann wrote: > On Thursday 10 March 2016, Vineet Gupta wrote: >> On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: >>> Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu >>> and le32_to_cpu because it is not really

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Arnd Bergmann
On Thursday 10 March 2016, Lada Trimasova wrote: > Driver is 8250, kernel is built for BE arc, nsim option in model > "nsim_isa_big_endian = 1". > > With current "readl" and "writel" implementation for ARC we read word from > memory without any endianess manipulation. So in case of little

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Arnd Bergmann
On Thursday 10 March 2016, Lada Trimasova wrote: > Driver is 8250, kernel is built for BE arc, nsim option in model > "nsim_isa_big_endian = 1". > > With current "readl" and "writel" implementation for ARC we read word from > memory without any endianess manipulation. So in case of little

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Lada Trimasova
Hi Vineet, Alexey, Arnd, On Thu, 2016-03-10 at 09:55 +, Vineet Gupta wrote: Can you or Lada provide more details as to exactly what is not working - what driver to be precise 8250 or dw-8250. And where exactly the failure shows up. I want to understand this more Noam told me off list that he

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Lada Trimasova
Hi Vineet, Alexey, Arnd, On Thu, 2016-03-10 at 09:55 +, Vineet Gupta wrote: Can you or Lada provide more details as to exactly what is not working - what driver to be precise 8250 or dw-8250. And where exactly the failure shows up. I want to understand this more Noam told me off list that he

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Vineet Gupta
On Thursday 10 March 2016 01:14 PM, Alexey Brodkin wrote: >>> For example, serial port driver doesn't work when kernel is build for >>> arc big endian architecture. >> Last I tested Big Endian on SDP with 8250 part + 8250 driver it was working >> fine. >> I presume this is the systemC model for

Re: [PATCH] arc: use little endian accesses

2016-03-10 Thread Vineet Gupta
On Thursday 10 March 2016 01:14 PM, Alexey Brodkin wrote: >>> For example, serial port driver doesn't work when kernel is build for >>> arc big endian architecture. >> Last I tested Big Endian on SDP with 8250 part + 8250 driver it was working >> fine. >> I presume this is the systemC model for

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Arnd Bergmann
On Thursday 10 March 2016, Vineet Gupta wrote: > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > > and le32_to_cpu because it is not really guaranteed that drivers handles > > any ordering themselves. > >

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Arnd Bergmann
On Thursday 10 March 2016, Vineet Gupta wrote: > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > > and le32_to_cpu because it is not really guaranteed that drivers handles > > any ordering themselves. > >

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Alexey Brodkin
Hi Vineet, On Thu, 2016-03-10 at 05:05 +, Vineet Gupta wrote: > +CC Noam > > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > > > > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > > and le32_to_cpu because it is not really guaranteed that drivers

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Alexey Brodkin
Hi Vineet, On Thu, 2016-03-10 at 05:05 +, Vineet Gupta wrote: > +CC Noam > > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > > > > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > > and le32_to_cpu because it is not really guaranteed that drivers

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Vineet Gupta
On Thursday 10 March 2016 10:35 AM, Vineet Gupta wrote: > +CC Noam > > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: >> > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu >> > and le32_to_cpu because it is not really guaranteed that drivers handles >> > any

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Vineet Gupta
On Thursday 10 March 2016 10:35 AM, Vineet Gupta wrote: > +CC Noam > > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: >> > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu >> > and le32_to_cpu because it is not really guaranteed that drivers handles >> > any

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Vineet Gupta
+CC Noam On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > and le32_to_cpu because it is not really guaranteed that drivers handles > any ordering themselves. That is the driver issue. readxx as API simply

Re: [PATCH] arc: use little endian accesses

2016-03-09 Thread Vineet Gupta
+CC Noam On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > and le32_to_cpu because it is not really guaranteed that drivers handles > any ordering themselves. That is the driver issue. readxx as API simply