[PATCH v2 4/9] ARC: clockevent: Prepare for DT based probe

2016-03-08 Thread Vineet Gupta
From: Noam Camus - call clocksource_probe() - This in turns needs of_clk_init() to be called earlier Cc: Daniel Lezcano Signed-off-by: Noam Camus [vgupta: broken off from a bigger patch] Signed-off-by: Vineet Gupta --- Changes v1 -> v2 - Rebased on 4.5-rc6 - Removed now not relevant heade

[PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()

2016-03-08 Thread Vineet Gupta
From: Alexey Brodkin UARTs usually have fixed clock so we're switching to use of constant values instead of something derived from core clock frequency. Among other things this will allow us to get rid of arc_{get|set}_core_freq() and switch to generic clock framework later on. Cc: Christian Ru

[PATCH v2 9/9] ARC: RIP arc_{get|set}_core_freq() clk API

2016-03-08 Thread Vineet Gupta
From: Alexey Brodkin There are no more users of this - so RIP! Signed-off-by: Alexey Brodkin [vgupta: update changelog] Signed-off-by: Vineet Gupta Signed-off-by: Vineet Gupta --- arch/arc/include/asm/clk.h | 22 -- arch/arc/kernel/Makefile | 2 +- arch/arc/kernel/clk

[PATCH v2 1/9] ARC: [dts] Add clk feeding into timers to DTs

2016-03-08 Thread Vineet Gupta
This allows us to introduce timers in DT in next commit Cc: Daniel Lezcano Cc: Rob Herring Cc: devicet...@vger.kernel.org Signed-off-by: Vineet Gupta --- arch/arc/boot/dts/axc001.dtsi | 6 ++ arch/arc/boot/dts/axc003.dtsi | 6 ++ arch/arc/boot/dts/axc003_idu.dtsi |

[PATCH v2 5/9] ARC: clockevent: DT based probe

2016-03-08 Thread Vineet Gupta
- timer frequency is derived from DT (no longer rely on top level DT "clock-frequency" probed early and exported by asm/clk.h) - TIMER0_IRQ need not be exported across arch code, confided to intc as it is property of same Cc: Noam Camus Cc: Daniel Lezcano Signed-off-by: Vineet Gupta --

[PATCH v2 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup

2016-03-08 Thread Vineet Gupta
From: Noam Camus ARC Timers so far have been handled as "legacy" w/o explicit description in DT. This poses challenge for newer platforms wanting to use them. This series will eventually help move timers over to DT. This patch does a small change of using a CPU notifier to set clockevent on non-

[PATCH v2 6/9] ARC: clocksource: DT based probe

2016-03-08 Thread Vineet Gupta
- Remove explicit clocksource setup and let it be done by OF framework by defining CLOCKSOURCE_OF_DECLARE() for various timers - This allows multiple clocksources to be potentially registered simultaneouly: previously we could only do one - as all of them had same arc_counter_setup() routine

[PATCH v2 2/9] ARC: [dts] Introduce Timer bindings

2016-03-08 Thread Vineet Gupta
ARC Timers have historically been probed directly. As precursor to start probing Timers thru DT introduce these bindings Note that to keep series bisectable, these bindings are not yet used in code. Cc: Daniel Lezcano Cc: Rob Herring Cc: devicet...@vger.kernel.org Signed-off-by: Vineet Gupta --

[PATCH v2 0/9] ARC clockevent/clocksource modernization

2016-03-08 Thread Vineet Gupta
Hi, This mini-series came out as a result of discussions during EZChip platform code review. This switches ARC timers to DT based probe and removes the homebrew clk API we had before. @Rob could you please take a look at the DT bindings. @Daniel any comments would be appreciated ! Thx, -Vineet

[PATCH v2 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk

2016-03-08 Thread Vineet Gupta
From: Alexey Brodkin For AXS103, certain bitfile configurations may not work with stock "clock-frequency" specified in DT. Instead of duplicating the DT files, we fixup the DT in-place. This used to be done differently - as in top level "clock-frequency" was read very early from FDT and exported

Re: [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()

2016-03-08 Thread christian . ruppert
Vineet Gupta wrote on 08.03.2016 13:26:10: > From: Alexey Brodkin > > UARTs usually have fixed clock so we're switching to use of > constant values instead of something derived from core clock > frequency. > > Among other things this will allow us to get rid of > arc_{get|set}_core_freq() and s

[PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Vineet Gupta
We observed livelocks on ARC SMP setup when running hackbench with SLUB. This hardware configuration lacks atomic instructions (LLOCK/SCOND) thus kernel resorts to a central @smp_bitops_lock to protect any R-M-W ops suh as test_and_set_bit() The spinlock itself is implemented using Atomic [EX]chan

Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Christoph Lameter
On Tue, 8 Mar 2016, Vineet Gupta wrote: > This in turn happened because slab_unlock() doesn't serialize properly > (doesn't use atomic clear) with a concurrent running > slab_lock()->test_and_set_bit() This is intentional because of the increased latency of atomic instructions. Why would the unlo

Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Vlastimil Babka
On 03/08/2016 03:30 PM, Vineet Gupta wrote: > We observed livelocks on ARC SMP setup when running hackbench with SLUB. > This hardware configuration lacks atomic instructions (LLOCK/SCOND) thus > kernel resorts to a central @smp_bitops_lock to protect any R-M-W ops > suh as test_and_set_bit() Soun

Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Vineet Gupta
On Tuesday 08 March 2016 08:30 PM, Christoph Lameter wrote: > On Tue, 8 Mar 2016, Vineet Gupta wrote: > >> This in turn happened because slab_unlock() doesn't serialize properly >> (doesn't use atomic clear) with a concurrent running >> slab_lock()->test_and_set_bit() > > This is intentional beca

Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Christoph Lameter
On Tue, 8 Mar 2016, Vineet Gupta wrote: > # set the bit > 80543b8e: ld_s r2,[r13,0] <--- (A) Finds PG_locked is set > 80543b90: or r3,r2,1<--- (B) other core unlocks right here > 80543b94: st_s r3,[r13,0] <--- (C) sets PG_locked (overwrites > unlock) Duh. Gues

Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic

2016-03-08 Thread Vineet Gupta
+CC linux-arch, parisc folks, PeterZ On Wednesday 09 March 2016 02:10 AM, Christoph Lameter wrote: > On Tue, 8 Mar 2016, Vineet Gupta wrote: > >> # set the bit >> 80543b8e:ld_s r2,[r13,0] <--- (A) Finds PG_locked is set >> 80543b90:or r3,r2,1<--- (B) other core unlocks r