linux/arch/arc/include/asm
Noam Camus 2a1021fce8 ARC: rwlock: disable interrupts in !LLSC variant
If we hold rwlock and interrupt occures we may
end up spinning on it for ever during softirq.
Note that this lock is an internal lock
and since the lock is free to be used from any context,
the lock needs to be IRQ-safe.

Below you may see an example for interrupt we get while
nl_table_lock is holding its rw->lock_mutex and we spinned
on it for ever.

The concept for the fix was taken from SPARC.

[2015-05-12 19:16:12] Stack Trace:
[2015-05-12 19:16:12]   arc_unwind_core+0xb8/0x11c
[2015-05-12 19:16:12]   dump_stack+0x68/0xac
[2015-05-12 19:16:12]   _raw_read_lock+0xa8/0xac
[2015-05-12 19:16:12]   netlink_broadcast_filtered+0x56/0x35c
[2015-05-12 19:16:12]   nlmsg_notify+0x42/0xa4
[2015-05-12 19:16:13]   neigh_update+0x1fe/0x44c
[2015-05-12 19:16:13]   neigh_event_ns+0x40/0xa4
[2015-05-12 19:16:13]   arp_process+0x46e/0x5a8
[2015-05-12 19:16:13]   __netif_receive_skb_core+0x358/0x500
[2015-05-12 19:16:13]   process_backlog+0x92/0x154
[2015-05-12 19:16:13]   net_rx_action+0xb8/0x188
[2015-05-12 19:16:13]   __do_softirq+0xda/0x1d8
[2015-05-12 19:16:14]   irq_exit+0x8a/0x8c
[2015-05-12 19:16:14]   arch_do_IRQ+0x6c/0xa8
[2015-05-12 19:16:14]   handle_interrupt_level1+0xe4/0xf0

Signed-off-by: Noam Camus <noamc@ezchip.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
2016-05-09 09:32:32 +05:30
..
arcregs.h ARC: build: Better way to detect ISA compatible toolchain 2016-03-12 11:58:30 +05:30
asm-offsets.h
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h ARCv2: barriers 2015-06-25 06:00:17 +05:30
bitops.h ARC: bitops: Remove non relevant comments 2016-03-11 14:59:54 +05:30
bug.h ARC: BUG() dumps stack after @msg (@msg now same as in generic BUG)) 2014-10-13 14:46:18 +05:30
cache.h ARCv2: ioremap: Support dynamic peripheral address space 2016-03-19 14:34:10 +05:30
cacheflush.h ARC: dma: ioremap: use phys_addr_t consistenctly in code paths 2016-03-19 14:34:09 +05:30
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
cmpxchg.h ARC: Fix misspellings in comments. 2016-03-11 14:59:53 +05:30
current.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
delay.h ARCv2: Adhere to Zero Delay loop restriction 2015-06-22 14:06:56 +05:30
disasm.h ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul) 2013-02-15 23:16:04 +05:30
dma-mapping.h ARC: dma: reintroduce platform specific dma<->phys 2016-03-19 14:34:09 +05:30
dma.h ARC: Add PCI support 2016-03-10 14:44:13 -06:00
elf.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
entry-arcv2.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
entry-compact.h ARC: Fix misspellings in comments. 2016-03-11 14:59:53 +05:30
entry.h ARCv2: STAR 9000808988: signals involving Delay Slot 2015-06-22 14:06:55 +05:30
exec.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
fb.h arc: Add our own implementation of fb_pgprotect() 2016-04-07 14:59:09 +05:30
futex.h ARC: change some branchs to jumps to resolve linkage errors 2015-08-20 18:53:15 +05:30
highmem.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
hugepage.h ARC, thp: remove infrastructure for handling splitting PMDs 2016-03-17 15:09:34 -07:00
io.h ARC: Add missing io barriers to io{read,write}{16,32}be() 2016-05-05 16:35:28 +05:30
irq.h ARC: irq: export some IRQs again 2016-05-09 09:32:30 +05:30
irqflags-arcv2.h ARCv2: Enable LOCKDEP 2016-04-22 18:12:31 +05:30
irqflags-compact.h ARC: Abstract out ISA specific SLEEP args 2015-11-16 14:17:02 +05:30
irqflags.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
kdebug.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
kgdb.h ARC: Update order of registers in KGDB to match GDB 7.5 2014-10-13 14:46:20 +05:30
kmap_types.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
kprobes.h ARC: Remove explicit passing around of ECR 2013-06-26 15:30:50 +05:30
linkage.h ARC: switch to generic ENTRY/END assembler annotations 2014-03-26 14:31:28 +05:30
mach_desc.h ARC: smp: Rename platform hook @init_cpu_smp -> @init_per_cpu 2015-12-17 12:56:56 +05:30
mcip.h ARCv2: clocksource: Rename GRTC -> GFRC ... 2016-01-29 16:51:02 +05:30
mmu_context.h ARC: [SMP] TLB flush 2013-11-06 10:41:45 +05:30
mmu.h ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
mmzone.h ARC: support HIGHMEM even without PAE40 2016-05-05 16:35:46 +05:30
module.h ARC: DWARF2 .debug_frame based stack unwinder 2013-02-15 23:16:03 +05:30
mutex.h ARC: SMP support 2013-02-15 23:16:02 +05:30
page.h ARC: support HIGHMEM even without PAE40 2016-05-05 16:35:46 +05:30
pci.h ARC: Add PCI support 2016-03-10 14:44:13 -06:00
perf_event.h ARCv2: perf: Finally introduce HS perf unit 2015-08-27 14:59:07 +05:30
pgalloc.h ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
pgtable.h ARC: Make vmalloc size configurable 2016-05-09 09:32:32 +05:30
processor.h ARC: Make vmalloc size configurable 2016-05-09 09:32:32 +05:30
ptrace.h ARC: Make pt_regs regs unsigned 2015-08-05 11:48:21 +05:30
sections.h of/fdt: consolidate built-in dtb section variables 2014-04-30 00:59:13 -05:00
segment.h ARC: uaccess friends 2013-02-11 20:00:31 +05:30
serial.h ARC: Dynamically determine BASE_BAUD from DeviceTree 2015-02-02 17:08:37 +05:30
setup.h ARC: boot log: move helper macros to header for reuse 2015-10-17 17:48:25 +05:30
shmparam.h ARC: [mm] Aliasing VIPT dcache support 4/4 2013-05-09 22:00:57 +05:30
smp.h ARC: rename smp operation init_irq_cpu() to init_per_cpu() 2015-12-17 12:56:43 +05:30
spinlock_types.h ARC: LLOCK/SCOND based rwlock 2015-08-04 09:26:33 +05:30
spinlock.h ARC: rwlock: disable interrupts in !LLSC variant 2016-05-09 09:32:32 +05:30
stacktrace.h ARC: Make arc_unwind_core accessible externally 2015-02-27 10:15:00 +05:30
string.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
switch_to.h ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
syscall.h ARC: stop using pt_regs->orig_r8 2013-06-22 19:23:26 +05:30
syscalls.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
thread_info.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
timex.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
tlb-mmu1.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlb.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlbflush.h ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build 2016-03-17 15:31:45 +05:30
uaccess.h ARCv2: Adhere to Zero Delay loop restriction 2015-06-22 14:06:56 +05:30
unaligned.h ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
unwind.h ARC: dw2 unwind: Reinstante unwinding out of modules 2015-12-17 11:10:23 +05:30