RE: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap

2016-11-03 Thread Alexey Brodkin
Hi Vineet, > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Thursday, November 03, 2016 8:04 PM > To: Alexey Brodkin ; > linux-snps-arc@lists.infradead.org > Cc: linux-ker...@vger.kernel.org; linux-a...@vger.kernel.org; Vineet Gupta > ; Marek Szyprowski > ;

Re: [PATCH v3 07/10] ARC: breakout aux handling into a separate header

2016-11-03 Thread kbuild test robot
Hi Vineet, [auto build test ERROR on linus/master] [also build test ERROR on v4.9-rc3 next-20161028] [cannot apply to arc/for-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Vineet-Gupta/Mo

[PATCH v3 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Vineet Gupta
The current code doesn't even compile as somehow the inline assembly can't see the register names defined as ARC_RTC_* I'm pretty sure It worked when I first got it merged, but the tools were definitely different then. So better to write this in "C" anyways. CC: sta...@vger.kernel.org Acked-by: D

[PATCH v3 08/10] ARC: move mcip.h into include/soc and adjust the includes

2016-11-03 Thread Vineet Gupta
Also remove the dependency on ARCv2, to increase compile coverage for !ARCV2 builds Acked-by: Daniel Lezcano Signed-off-by: Vineet Gupta --- arch/arc/kernel/mcip.c | 2 +- arch/arc/kernel/time.c | 2 +- arch/arc/plat-axs10x/axs10x.c

[PATCH v3 09/10] ARC: breakout timer include code into separate header ...

2016-11-03 Thread Vineet Gupta
... which allows for use in drivers/clocksource later Signed-off-by: Vineet Gupta --- arch/arc/include/asm/arcregs.h | 9 + arch/arc/kernel/time.c | 18 +++--- include/soc/arc/timers.h | 38 ++ 3 files changed, 42 insertions(

[PATCH v3 07/10] ARC: breakout aux handling into a separate header

2016-11-03 Thread Vineet Gupta
ARC timers use aux registers for programming and this paves way for moving ARC timer drivers into drivers/clocksource Signed-off-by: Vineet Gupta --- arch/arc/include/asm/arcregs.h | 85 +- arch/arc/include/asm/mcip.h| 2 +- include/soc/arc/aux.h

[PATCH v3 02/10] ARC: timer: gfrc, rtc: deuglify big endian code

2016-11-03 Thread Vineet Gupta
A standard "C" shift will be handled appropriately by the compiler depending on the endian for the build. So we don't need the explicit distinction in code Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 30 -- 1 file changed, 8 insertions(+), 22 deletions(-)

[PATCH v3 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
This adds support for - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP from @CNT to @LIMIT, before optionally triggering an interrupt. These are programmed using ARC auxiliary register interface. These are present in all ARC cores (ARC700 and ARC HS38) TIMER0 serve

[PATCH v3 00/10] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Vineet Gupta
Hi, This series addresses the long pending move of ARC timer code into drivers/clocksource/. Thx, -Vineet v2 -> v3 - Fixed a bunch of typos in changelogs [Daniel] - aux.h: stubs for {read,write}_aux_reg() inline functions(vs. macros) to cleanly avoid warnings in !ARC

[PATCH v3 06/10] ARC: timer: Build gfrc, rtc under same option (64-bit timers)

2016-11-03 Thread Vineet Gupta
The original distinction was done as they were developed at different times and primarily because they are specific to UP (RTC) and SMP (GFRC). But given that driver handles that at runtime, (i.e. not allowing RTC as clocksource in SMP), we can simplify things a bit. Signed-off-by: Vineet Gupta

[PATCH v3 04/10] ARC: timer: gfrc: boot print alongside other timers

2016-11-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 0385df77a697..595d06900061 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -234,11 +234,1

[PATCH v3 03/10] ARC: timer: gfrc, rtc: Read BCR to detect whether hardware exists ...

2016-11-03 Thread Vineet Gupta
... don't rely on cpuinfo populated in arc boot code. This paves way for moving this code in drivers/clocksource/ And while at it, convert the WARN() to pr_warn() as sugested by Daniel Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 18 +- 1 file changed, 13 insertions(

[PATCH v3 05/10] ARC: time: move time_init() out of the driver

2016-11-03 Thread Vineet Gupta
to allow future git mv of the driver into drivers/clocksource Acked-by: Daniel Lezcano Signed-off-by: Vineet Gupta --- arch/arc/kernel/setup.c | 11 +++ arch/arc/kernel/time.c | 9 - 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch

Re: [PATCH v2 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
On 11/03/2016 04:01 PM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 03:50:21PM -0700, Vineet Gupta wrote: >> On 11/03/2016 03:38 PM, Daniel Lezcano wrote: >>> On Thu, Nov 03, 2016 at 02:31:41PM -0700, Vineet Gupta wrote: This adds support for - CONFIG_ARC_TIMERS : legacy 32-bit

Re: [PATCH v2 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 03:50:21PM -0700, Vineet Gupta wrote: > On 11/03/2016 03:38 PM, Daniel Lezcano wrote: > > On Thu, Nov 03, 2016 at 02:31:41PM -0700, Vineet Gupta wrote: > >> This adds support for > >> > >> - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP > >>from @CN

Re: [PATCH v2 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
On 11/03/2016 03:38 PM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 02:31:41PM -0700, Vineet Gupta wrote: >> This adds support for >> >> - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP >>from @CNT to @LIMIT, before optionally triggering an interrupt. >>These are pr

Re: [PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 03:44:24PM -0700, Vineet Gupta wrote: > On 11/03/2016 03:35 PM, Daniel Lezcano wrote: > > On Thu, Nov 03, 2016 at 03:23:09PM -0700, Vineet Gupta wrote: > >> On 11/03/2016 02:52 PM, Daniel Lezcano wrote: > >>> On Thu, Nov 03, 2016 at 02:31:32PM -0700, Vineet Gupta wrote: > >>

Re: [PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Vineet Gupta
On 11/03/2016 03:35 PM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 03:23:09PM -0700, Vineet Gupta wrote: >> On 11/03/2016 02:52 PM, Daniel Lezcano wrote: >>> On Thu, Nov 03, 2016 at 02:31:32PM -0700, Vineet Gupta wrote: The current code doesn't even compile >>> >>> Give a better desc

Re: [PATCH v2 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 02:31:41PM -0700, Vineet Gupta wrote: > This adds support for > > - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP >from @CNT to @LIMIT, before optionally triggering an interrupt. >These are programmed using ARC auxiliary register interface. >

Re: [PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 03:23:09PM -0700, Vineet Gupta wrote: > On 11/03/2016 02:52 PM, Daniel Lezcano wrote: > > On Thu, Nov 03, 2016 at 02:31:32PM -0700, Vineet Gupta wrote: > >> The current code doesn't even compile > > > > Give a better description in the log, especially if this patch is

Re: [PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Vineet Gupta
On 11/03/2016 02:52 PM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 02:31:32PM -0700, Vineet Gupta wrote: >> The current code doesn't even compile > > Give a better description in the log, especially if this patch is supposed to > go to stable@ OK. > >> CC: sta...@vger.kernel.org >> S

Re: [PATCH v2 02/10] ARC: timer: gfrc, rtc: deuglify big endian code

2016-11-03 Thread Vineet Gupta
On 11/03/2016 02:55 PM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 02:31:33PM -0700, Vineet Gupta wrote: >> A standard "C" shift will be handled appropriately by the compiler >> dependin gon the endian used fo rbuild. So we don't need the > > s/dependin gon/depending on/ > s/fo rbuild/for bui

Re: [PATCH v2 06/10] ARC: timer: Build gfrc, rtc under same option (64-bit timers)

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 02:31:37PM -0700, Vineet Gupta wrote: > The original distinction was done as they were deveoped at different s/deveoped/developed/ > times and primarily becuse they are specific to UP (RTC) and SMP (GFRC). s/becuse/because/ > > But given that driver now handles that at

Re: [PATCH v2 02/10] ARC: timer: gfrc, rtc: deuglify big endian code

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 02:31:33PM -0700, Vineet Gupta wrote: > A standard "C" shift will be handled appropriately by the compiler > dependin gon the endian used fo rbuild. So we don't need the s/dependin gon/depending on/ s/fo rbuild/for build/ > explicit distinction in code > > Signed-off-by:

Re: [PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 02:31:32PM -0700, Vineet Gupta wrote: > The current code doesn't even compile Give a better description in the log, especially if this patch is supposed to go to stable@ > CC: sta...@vger.kernel.org > Signed-off-by: Vineet Gupta > --- > arch/arc/kernel/time.c | 19

[PATCH v2 10/10] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
This adds support for - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP from @CNT to @LIMIT, before optionally triggering an interrupt. These are programmed using ARC auxiliary register interface. These are present in all ARC cores (ARC700 and ARC HS38) TIMER0 serve

[PATCH v2 09/10] ARC: breakout timer include code into separate header ...

2016-11-03 Thread Vineet Gupta
... which allows for use in drivers/clocksource later Signed-off-by: Vineet Gupta --- arch/arc/include/asm/arcregs.h | 9 + arch/arc/kernel/time.c | 18 +++--- include/soc/arc/timers.h | 38 ++ 3 files changed, 42 insertions(

[PATCH v2 02/10] ARC: timer: gfrc, rtc: deuglify big endian code

2016-11-03 Thread Vineet Gupta
A standard "C" shift will be handled appropriately by the compiler dependin gon the endian used fo rbuild. So we don't need the explicit distinction in code Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 30 -- 1 file changed, 8 insertions(+), 22 deletions(-

[PATCH v2 01/10] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Vineet Gupta
The current code doesn't even compile CC: sta...@vger.kernel.org Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index f927b8dc6edd..1a117b999c0c 1

[PATCH v2 05/10] ARC: time: move time_init() out of the driver

2016-11-03 Thread Vineet Gupta
to allow future git mv of the driver into drivers/clocksource Acked-by: Daniel Lezcano Signed-off-by: Vineet Gupta --- arch/arc/kernel/setup.c | 11 +++ arch/arc/kernel/time.c | 9 - 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch

[PATCH v2 04/10] ARC: timer: gfrc: boot print alongside other timers

2016-11-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 0385df77a697..595d06900061 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -234,11 +234,1

[PATCH v2 03/10] ARC: timer: gfrc, rtc: Read BCR to detect whether hardware exists ...

2016-11-03 Thread Vineet Gupta
... don't rely on cpuinfo populated in arc boot code. This paves way for moving this code in drivers/clocksource/ And while at it, convert the WARN() to pr_warn() as sugested by Daniel Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 18 +- 1 file changed, 13 insertions(

[PATCH v2 06/10] ARC: timer: Build gfrc, rtc under same option (64-bit timers)

2016-11-03 Thread Vineet Gupta
The original distinction was done as they were deveoped at different times and primarily becuse they are specific to UP (RTC) and SMP (GFRC). But given that driver now handles that at runtime, (i.e. not allowing RTC as clocksource in SMP), we can simplify things a bit. Signed-off-by: Vineet Gupta

[PATCH v2 08/10] ARC: move mcip.h into include/soc and adjust the includes

2016-11-03 Thread Vineet Gupta
Also remove the dependency on ARCv2, to increase compile coverage for !ARCV2 builds Acked-by: Daniel Lezcano Signed-off-by: Vineet Gupta --- arch/arc/kernel/mcip.c | 2 +- arch/arc/kernel/time.c | 2 +- arch/arc/plat-axs10x/axs10x.c

[PATCH v2 07/10] ARC: breakout aux handling into a separate header

2016-11-03 Thread Vineet Gupta
ARC timers use aux registers for programming and this paves way for moving ARC timer drivers into drivers/clocksource Signed-off-by: Vineet Gupta --- arch/arc/include/asm/arcregs.h | 85 +- arch/arc/include/asm/mcip.h| 2 +- include/soc/arc/aux.h

[PATCH v2 00/10] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Vineet Gupta
Hi, This series addresses the long pending move of ARC timer code into drivers/clocksource/. Thx, -Vineet v1 -> v2 - Now 10 patches instead of 9 to handle BIG ENDIAN in arch agnostic way - Moved fix for RTC (v1 2/9) ahead of queue (v2 1/10) to allow for easier stable backport - Folded the K

Re: [PATCH v2 00/10] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Vineet Gupta
On 11/03/2016 02:21 PM, Vineet Gupta wrote: > Hi, > > This series addresses the long pending move of ARC timer code into > drivers/clocksource/. > > Thx, > -Vineet Sorry patch sending got aborted, git send-email SNAFU - tripping on '#' below CC: stable #4.2+ ---> likes [4.2+]

[PATCH v2 00/10] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Vineet Gupta
Hi, This series addresses the long pending move of ARC timer code into drivers/clocksource/. Thx, -Vineet v1 -> v2 - Now 10 patches instead of 9 to handle BIG ENDIAN in arch agnostic way - Moved fix for RTC (v1 2/9) ahead of queue (v2 1/10) to allow for easier stable backport - Folded the K

[PATCH v2 00/10] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Vineet Gupta
Hi, This series addresses the long pending move of ARC timer code into drivers/clocksource/. Thx, -Vineet v1 -> v2 - Now 10 patches instead of 9 to handle BIG ENDIAN in arch agnostic way - Moved fix for RTC (v1 2/9) ahead of queue (v2 1/10) to allow for easier stable backport - Folded the K

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
On 11/03/2016 10:33 AM, Daniel Lezcano wrote: > As now the clksrc-probe is correctly handling the errors, if the rtc and the > gfrc are both defined in the DT, you can fail to init the rtc one with a > simple > test in the init function: > > if (IS_DEFINED(CONFIG_SMP)) > retur

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
On 11/03/2016 11:11 AM, Daniel Lezcano wrote: >> Thx for taking a quick look - this is a good start. How about the actual >> driver >> > itself, do you want to take a quick look there as well before v2 ? > At the first glance, with your changes it is acceptable to be moved. Perhaps, > you can have

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 06:33:17PM +0100, Daniel Lezcano wrote: [ ... ] > As now the clksrc-probe is correctly handling the errors, if the rtc and the > gfrc are both defined in the DT, you can fail to init the rtc one with a > simple > test in the init function: > > if (IS_DEFINED(CONFIG

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 10:57:48AM -0700, Vineet Gupta wrote: > Hi Daniel, > > On 11/03/2016 09:50 AM, Daniel Lezcano wrote: > > On Thu, Nov 03, 2016 at 09:40:23AM -0700, Vineet Gupta wrote: > >> On 11/01/2016 06:03 PM, Vineet Gupta wrote: > > Because of the git mv you, diff didn't include bul

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
Hi Daniel, On 11/03/2016 09:50 AM, Daniel Lezcano wrote: > On Thu, Nov 03, 2016 at 09:40:23AM -0700, Vineet Gupta wrote: >> On 11/01/2016 06:03 PM, Vineet Gupta wrote: > Because of the git mv you, diff didn't include bulk of driver code which > would >>> make for bulk of review anyway

Re: [PATCH 3/9] ARC: timer: gfrc: boot print alongside other timers

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 10:47:19AM -0700, Vineet Gupta wrote: > On 11/03/2016 10:09 AM, Daniel Lezcano wrote: > > On Mon, Oct 31, 2016 at 03:48:10PM -0700, Vineet Gupta wrote: > >> Signed-off-by: Vineet Gupta > > > > Why not add a message in drivers/clocksource/clksrc-probe.c when a timer > > in

Re: [PATCH 3/9] ARC: timer: gfrc: boot print alongside other timers

2016-11-03 Thread Vineet Gupta
On 11/03/2016 10:09 AM, Daniel Lezcano wrote: > On Mon, Oct 31, 2016 at 03:48:10PM -0700, Vineet Gupta wrote: >> Signed-off-by: Vineet Gupta > > Why not add a message in drivers/clocksource/clksrc-probe.c when a timer inits > successfully ? and then get rid of this code. At boot I have bunch of

Re: [PATCH 2/9] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Vineet Gupta
On 11/03/2016 10:02 AM, Daniel Lezcano wrote: > On Mon, Oct 31, 2016 at 03:48:09PM -0700, Vineet Gupta wrote: >> To allow for easy movement into drivers/clocksource >> >> Signed-off-by: Vineet Gupta >> --- >> arch/arc/kernel/time.c | 13 + >> 1 file changed, 5 insertions(+), 8 deletio

Re: [PATCH 1/9] ARC: timer: gfrc, rtc: Read BCR to detect whether hardware exists ...

2016-11-03 Thread Vineet Gupta
On 11/03/2016 10:00 AM, Daniel Lezcano wrote: > On Mon, Oct 31, 2016 at 03:48:08PM -0700, Vineet Gupta wrote: >> ... don't rely on cpuinfo populated in arc boot code. This paves wat for >> moving this code in drivers/clocksource/ >> >> Signed-off-by: Vineet Gupta >> --- >> arch/arc/kernel/time.c

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Tue, Nov 01, 2016 at 01:57:05PM -0700, Vineet Gupta wrote: > Hi Daniel, > > On 11/01/2016 01:42 PM, Daniel Lezcano wrote: > > Please stay consistent with the rest of the Kconfig. > > > > config ARC_TIMER_RTC > > bool "64-bit cycle counter in HS38 cores" if COMPILE_TEST > > select CLKSR

Re: [PATCH 0/9] Move ARC timer code into drivers/clocksource/

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:07PM -0700, Vineet Gupta wrote: > Hi, > > This series addresses the long pending move of ARC timer code into > drivers/clocksource/. > > - patches [1-4]/9 are improvements to arc code, paving way for later code > motion. > - patches [5-8]/9 refactor the arc headers

Re: [PATCH 7/9] ARC: breakout timer stuff into a seperate header

2016-11-03 Thread Daniel Lezcano
s/seperate/separate/ On Mon, Oct 31, 2016 at 03:48:14PM -0700, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta > --- > arch/arc/include/asm/arcregs.h | 9 + > arch/arc/kernel/time.c | 2 +- > include/soc/arc/timers.h | 24 > 3 files changed, 26

Re: [PATCH 6/9] ARC: move mcip.h into include/soc and adjust the includes

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:13PM -0700, Vineet Gupta wrote: > Also remove the depedency on ARCv2, to increase compile coverage for > !ARCV2 builds s/depedency/dependency/ Acked-by: Daniel Lezcano > Signed-off-by: Vineet Gupta > --- > arch/arc/kernel/mcip.c | 2 +- >

Re: [PATCH 4/9] ARC: time: move time_init() out of the driver

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:11PM -0700, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta > --- Acked-by: Daniel Lezcano ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 3/9] ARC: timer: gfrc: boot print alongside other timers

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:10PM -0700, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta Why not add a message in drivers/clocksource/clksrc-probe.c when a timer inits successfully ? and then get rid of this code. > --- > arch/arc/kernel/setup.c | 6 +++--- > 1 file changed, 3 insertions(+),

Re: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap

2016-11-03 Thread Vineet Gupta
On 11/03/2016 08:06 AM, Alexey Brodkin wrote: > We used to use generic implementation of dma_map_ops.mmap which is > dma_common_mmap() but that only worked for simpler cached mappings when > vaddr = paddr. > > If a driver requests uncached DMA buffer kernel maps it to virtual > address so that MMU

Re: [PATCH 2/9] ARC: timer: rtc: implement read loop in "C" vs. inline asm

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:09PM -0700, Vineet Gupta wrote: > To allow for easy movement into drivers/clocksource > > Signed-off-by: Vineet Gupta > --- > arch/arc/kernel/time.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/arch/arc/kernel/time.c b/arch

Re: [PATCH 1/9] ARC: timer: gfrc, rtc: Read BCR to detect whether hardware exists ...

2016-11-03 Thread Daniel Lezcano
On Mon, Oct 31, 2016 at 03:48:08PM -0700, Vineet Gupta wrote: > ... don't rely on cpuinfo populated in arc boot code. This paves wat for > moving this code in drivers/clocksource/ > > Signed-off-by: Vineet Gupta > --- > arch/arc/kernel/time.c | 10 ++ > 1 file changed, 6 insertions(+), 4

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Daniel Lezcano
On Thu, Nov 03, 2016 at 09:40:23AM -0700, Vineet Gupta wrote: > On 11/01/2016 06:03 PM, Vineet Gupta wrote: > >>> Because of the git mv you, diff didn't include bulk of driver code which > >>> would > >>> >> make for bulk of review anyways. So perhaps in v2 I don't do the git > >>> >> mv. OK ? >

Re: [PATCH 9/9] clocksource: import ARC timer driver

2016-11-03 Thread Vineet Gupta
On 11/01/2016 06:03 PM, Vineet Gupta wrote: >>> Because of the git mv you, diff didn't include bulk of driver code which >>> would >>> >> make for bulk of review anyways. So perhaps in v2 I don't do the git mv. >>> >> OK ? >> > >> > That means I will review and comment existing code. It is not a

stmmac: GMAC_RGSMIIIS reports bogus values

2016-11-03 Thread Alexey Brodkin
Hello, I'm seeing pretty strange issue with GMAC reporting a lot of link state changes based on bits in GMAC_RGSMIIIS. It looks like that: -->8--- Link is Down Link is Up - 10/Full Link is Down Link is Up - 10/Half Link is Down Link is Down Link is Up -

[PATCH v2] arc: Implement arch-specific dma_map_ops.mmap

2016-11-03 Thread Alexey Brodkin
We used to use generic implementation of dma_map_ops.mmap which is dma_common_mmap() but that only worked for simpler cached mappings when vaddr = paddr. If a driver requests uncached DMA buffer kernel maps it to virtual address so that MMU gets involved and page uncached status takes into account

[PATCH v3 1/3] ARC: SMP: Register IPI handler using virq but not hwirq

2016-11-03 Thread Yuriy Kolerov
smp_ipi_irq_setup takes a cpu number and a hwirq number for the per core local interrupt line in the root interrupt controller and registers an appropriate IPI handler per cpu. However this function tries to bind a handler to the hwirq as virtual IRQ number and it is a wrong behavior. It is necessa

[PATCH v3 3/3] ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-11-03 Thread Yuriy Kolerov
ARC linux uses 2 distribution modes for common interrupts: round robin mode (IDU_M_DISTRI_RR) and a simple destination mode (IDU_M_DISTRI_DEST). The first one is used when more than 1 cores may handle a common interrupt and the second one is used when only 1 core may handle a common interrupt. How

[PATCH v3 2/3] ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-11-03 Thread Yuriy Kolerov
Multicore ARC configurations use IDU (Interrupt Distribution Unit) for distributing of common interrupts. In fact IDU is a interrupt controller on top of main per core interrupt controller. All common IRQs are physically and linearly mapped to per core interrupts. E.g. <0, 1, 2, 3> common IDU inte

[PATCH v3 0/3] ARC: Set of patches for IRQ subsystem

2016-11-03 Thread Yuriy Kolerov
First 2 patches fix misuse of IRQ numbers. In some places of the Linux kernel for ARC hardware IRQ numbers are used as virtual IRQ numbers and obviously it is wrong. The third patch forces the kernel to set a simple distribution mode for common interrupts in cases when such interrupts are routed t