[PATCH 4/5] ARCv2: Elide sending new cross core intr if receiver didn't ack prev

2016-02-23 Thread Vineet Gupta
ARConnect/MCIP IPI sending has a retry-wait loop in case caller had not seen a previous such interrupt. Turns out that it is not needed at all. Linux cross core calling allows coalescing multiple IPIs to same receiver - it is fine as long as there is one. This logic is built into upper layer alrea

[PATCH 0/5] ARC IPI related fix

2016-02-23 Thread Vineet Gupta
Hi, This cam eout of debugging a csd deadlock on ARC. The fix itself is 1/5, rest of patches are additional improvements, optimizations while we are at it. Thx, -Vineet Vineet Gupta (5): ARCv2: SMP: Emulate IPI to self using software triggered interrupt ARC: [intc-compact] Remove IPI setup f

[PATCH 1/5] ARCv2: SMP: Emulate IPI to self using software triggered interrupt

2016-02-23 Thread Vineet Gupta
ARConnect/MCIP Inter-Core-Interrupt module can't send interrupt to local core. So use core intc capability to trigger software interrupt to self, using an unsued IRQ #21. This showed up as csd deadlock with LTP trace_sched on a dual core system. This test acts as scheduler fuzzer, triggering all s

[PATCH 3/5] ARCv2: SMP: Push IPI_IRQ into IPI provider

2016-02-23 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/mcip.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h index bc5103637326..49014f0ef36d 100644 --- a/arch/arc/include/asm/irq.h +++ b/a

[PATCH 2/5] ARC: [intc-compact] Remove IPI setup from ARCompact port

2016-02-23 Thread Vineet Gupta
There is no real ARC700 based SMP SoC so remove IPI definition. EZChip's SMP ARC700 is going to use a different intc and IPI provider anyways. Signed-off-by: Vineet Gupta --- arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/intc-compact.c | 3 --- 2 files changed, 4 deletions(-) diff --git

[PATCH 5/5] ARC: SMP: No need for CONFIG_ARC_IPI_DBG

2016-02-23 Thread Vineet Gupta
This was more relevant during SMP bringup. The warning for bogus msg better be visible always. Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 8 arch/arc/kernel/mcip.c | 9 + arch/arc/kernel/smp.c | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git

Re: Interesting csd deadlock on ARC

2016-02-23 Thread Peter Zijlstra
On Tue, Feb 23, 2016 at 10:51:42AM +0530, Vineet Gupta wrote: > On Friday 19 February 2016 12:17 PM, Vineet Gupta wrote: > > Hi Peter, > > > > I've been debugging a csd_lock_wait() deadlock on SMP+PREEMPT ARC HS38x2 > > and it > > turned out to be lot more interesting than I'd hoped for. This is

Re: Interesting csd deadlock on ARC

2016-02-23 Thread Vineet Gupta
>> What I actually meant was is it OK for irq_work_queue_on() to be called >> locally >> (is this a sched bug/optimization(. Further if it is OK to be called, does >> it need >> to do behave more like irq_work_queue() i.e. call arch_irq_work_raise() or >> arch_send_call_function_single_ipi() is e

Re: Interesting csd deadlock on ARC

2016-02-23 Thread Peter Zijlstra
On Tue, Feb 23, 2016 at 03:51:23PM +0530, Vineet Gupta wrote: > > > > Now the distinct difference between arch_irq_work_raise() and > > arch_send_call_function_single_ipi() is that arch_irq_work_raise() > > should be NMI-safe. > > Ok - so when I implement interrupt priorities (aka NMI for ARC), t

RE: Interesting csd deadlock on ARC

2016-02-23 Thread Noam Camus
>From: Peter Zijlstra [mailto:pet...@infradead.org] >Sent: Tuesday, February 23, 2016 12:40 PM >The only requirement for irq_work is that it runs after the NMI completes and >runs from regular IRQ context. >There are no strict interrupt priority >requirements, only that it happens. We here alr

[PATCH 0/4 RESEND] Add I2S/ADV7511 audio support for ARC AXS10x boards

2016-02-23 Thread Jose Abreu
ARC AXS10x platforms consist of a mainboard with several peripherals. One of those peripherals is an HDMI output port controlled by ADV7511 transmitter. This patch set adds audio for the ADV7511 transmitter and I2S audio for the AXS10x platform. Jose Abreu (4): [adv7511] Add audio support [a

[PATCH 2/4 RESEND] ARC: axs10x: Update defconfigs so that audio is enabled

2016-02-23 Thread Jose Abreu
The defconfigs for the AXS boards were updated so that ALSA SoC is enabled and also the audio for the ADV7511 HDMI transmitter. Signed-off-by: Jose Abreu --- arch/arc/configs/axs101_defconfig | 3 +++ arch/arc/configs/axs103_defconfig | 5 + arch/arc/configs/axs103_smp_defconfig | 5

[PATCH 3/4 RESEND] ASoC: dwc: Add I2S HDMI audio support using custom platform driver

2016-02-23 Thread Jose Abreu
HDMI audio support was added to the AXS board using an I2S cpu driver and a custom platform driver. The platform driver supports two channels @ 16 bits with rates 32k, 44.1k and 48k. ALSA Simple audio card is used to glue the cpu, platform and codec driver (adv7511). Signed-off-by: Jose Abreu --

[PATCH 4/4 RESEND] ARC: axs10x: Update defconfigs so that I2S is enabled

2016-02-23 Thread Jose Abreu
The defconfigs for the AXS boards were updated to enable Designware I2S driver. Signed-off-by: Jose Abreu --- arch/arc/configs/axs101_defconfig | 1 + arch/arc/configs/axs103_defconfig | 1 + arch/arc/configs/axs103_smp_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch

Re: [PATCH 2/4] drm: Add DT bindings documentation for ARC PGU display controller

2016-02-23 Thread Rob Herring
On Fri, Feb 19, 2016 at 04:03:52PM +0300, Alexey Brodkin wrote: > This add DT bindings documentation for ARC PGU display controller. > > Signed-off-by: Alexey Brodkin > Cc: Rob Herring > Cc: Pawel Moll > Cc: Mark Rutland > Cc: Ian Campbell > Cc: Kumar Gala > Cc: devicet...@vger.kernel.org >

[PATCH] ARC: Fix misspellings in comments.

2016-02-23 Thread Adam Buchbinder
Signed-off-by: Adam Buchbinder --- arch/arc/include/asm/cmpxchg.h | 2 +- arch/arc/include/asm/entry-compact.h | 2 +- arch/arc/include/asm/pgtable.h | 2 +- arch/arc/kernel/stacktrace.c | 2 +- arch/arc/kernel/time.c | 4 ++-- arch/arc/mm/cache.c

Re: [PATCH 2/4 RESEND] ARC: axs10x: Update defconfigs so that audio is enabled

2016-02-23 Thread Vineet Gupta
On Tuesday 23 February 2016 07:22 PM, Jose Abreu wrote: > The defconfigs for the AXS boards were updated so that > ALSA SoC is enabled and also the audio for the ADV7511 > HDMI transmitter. > > Signed-off-by: Jose Abreu > --- > arch/arc/configs/axs101_defconfig | 3 +++ > arch/arc/configs/axs

Re: Interesting csd deadlock on ARC

2016-02-23 Thread Vineet Gupta
On Tuesday 23 February 2016 04:28 PM, Noam Camus wrote: >> From: Peter Zijlstra [mailto:pet...@infradead.org] >> Sent: Tuesday, February 23, 2016 12:40 PM > >> The only requirement for irq_work is that it runs after the NMI completes >> and runs from regular IRQ context. >There are no strict int

Re: Interesting csd deadlock on ARC

2016-02-23 Thread Vineet Gupta
On Tuesday 23 February 2016 03:28 PM, Peter Zijlstra wrote: > On Tue, Feb 23, 2016 at 10:51:42AM +0530, Vineet Gupta wrote: >> On Friday 19 February 2016 12:17 PM, Vineet Gupta wrote: >>> Hi Peter, >>> >>> I've been debugging a csd_lock_wait() deadlock on SMP+PREEMPT ARC HS38x2 >>> and it >>> turn

Re: [PATCH] arc: make sure __delay() never gets executed with 0 loops

2016-02-23 Thread Vineet Gupta
On Monday 15 February 2016 10:07 PM, Alexey Brodkin wrote: > Current implementation of __delay() function uses so-called > zero-delay loops. And the only condition to exit that loop is > LP_COUNT (loop count register) = 1 (but not 0 as it might be easily > imagined). So u can fix this better by do

[GIT PULL] ARC fixes for 4.5-rc6

2016-02-23 Thread Vineet Gupta
Hi Linus, A critical bug fix since the last pull request and a sweeping defconfig cleanup from Alexey. Please pull. Thx, -Vineet > The following changes since commit 18558cae0272f8fd9647e69d3fec1565a7949865: Linux 4.5-rc4 (2016-02-14 13:05:20 -0800) are available in the git repository a