Re: [PATCH v2] ARC: change defconfig defaults to ARCv2

2018-11-30 Thread Kevin Hilman
Alexey Brodkin writes: > From: Kevin Hilman > > Change the default defconfig (used with 'make defconfig') to the ARCv2 > nsim_hs_defconfig, and also switch the default Kconfig ISA selection to > ARCv2. > > This allows several default defconfigs (e.g. make defconfig, make > allnoconfig, make tiny

Re: [PATCH v3] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread Vineet Gupta
On 11/30/18 1:47 AM, Jose Abreu wrote: > Some ARC CPU's do not support unaligned loads/stores. Currently, generic > implementation of reads{b/w/l}()/writes{b/w/l}() is being used with ARC. > This can lead to misfunction of some drivers as generic functions do a > plain dereference of a pointer that

Re: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread Vineet Gupta
On 11/30/18 5:57 AM, David Laight wrote: > There're even identical opcodes... > The barrier() (etc) in the asm output probably stopped the optimisation. > > It also seems to have used a different type of loop to the > other example, probably less efficient. > (Not that I'm an expert on ARC opcodes.

Re: [PATCH v2] ARC: change defconfig defaults to ARCv2

2018-11-30 Thread Vineet Gupta
On 11/30/18 4:52 AM, Alexey Brodkin wrote: > From: Kevin Hilman > > Change the default defconfig (used with 'make defconfig') to the ARCv2 > nsim_hs_defconfig, and also switch the default Kconfig ISA selection to > ARCv2. > > This allows several default defconfigs (e.g. make defconfig, make > alln

RE: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread David Laight
From: Arnd Bergmann > Sent: 30 November 2018 13:44 > > On Fri, Nov 30, 2018 at 9:57 AM Jose Abreu wrote: > > On 29-11-2018 21:20, Arnd Bergmann wrote: > > > On Thu, Nov 29, 2018 at 5:14 PM Jose Abreu > > > wrote: > > >> See how the if condition added in this version is checked in > > >> and th

Re: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread Arnd Bergmann
On Fri, Nov 30, 2018 at 9:57 AM Jose Abreu wrote: > On 29-11-2018 21:20, Arnd Bergmann wrote: > > On Thu, Nov 29, 2018 at 5:14 PM Jose Abreu wrote: > >> See how the if condition added in this version is checked in > >> and then it takes two different loops. > > This looks good to me. I wonder wh

[PATCH v2] ARC: change defconfig defaults to ARCv2

2018-11-30 Thread Alexey Brodkin
From: Kevin Hilman Change the default defconfig (used with 'make defconfig') to the ARCv2 nsim_hs_defconfig, and also switch the default Kconfig ISA selection to ARCv2. This allows several default defconfigs (e.g. make defconfig, make allnoconfig, make tinyconfig) to all work with ARCv2 by defau

[PATCH v3] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread Jose Abreu
Some ARC CPU's do not support unaligned loads/stores. Currently, generic implementation of reads{b/w/l}()/writes{b/w/l}() is being used with ARC. This can lead to misfunction of some drivers as generic functions do a plain dereference of a pointer that can be unaligned. Let's use {get/put}_unalign

Re: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}()

2018-11-30 Thread Jose Abreu
On 29-11-2018 21:20, Arnd Bergmann wrote: > On Thu, Nov 29, 2018 at 5:14 PM Jose Abreu wrote: > >> --->8-- >> static noinline void test_readsl(char *buf, int len) >> { >> readsl(0xdeadbeef, buf, len); >> } >> --->8--- >> >> And the disassembly: >> --->8--- >> 0e88 : >> e88:breq.dr