linux/arch/arc/include/asm
Daniel Mentz 18b43e89d2 ARC: Call trace_hardirqs_on() before enabling irqs
trace_hardirqs_on_caller() in lockdep.c expects to be called before, not
after interrupts are actually enabled.

The following comment in kernel/locking/lockdep.c substantiates this
claim:

"
/*
 * We're enabling irqs and according to our state above irqs weren't
 * already enabled, yet we find the hardware thinks they are in fact
 * enabled.. someone messed up their IRQ state tracing.
 */
"

An example can be found in include/linux/irqflags.h:

	do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)

Without this change, we hit the following DEBUG_LOCKS_WARN_ON.

[    7.760000] ------------[ cut here ]------------
[    7.760000] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2711 resume_user_mode_begin+0x48/0xf0
[    7.770000] DEBUG_LOCKS_WARN_ON(!irqs_disabled())
[    7.780000] Modules linked in:
[    7.780000] CPU: 0 PID: 1 Comm: init Not tainted 4.7.0-00003-gc668bb9-dirty #366
[    7.790000]
[    7.790000] Stack Trace:
[    7.790000]   arc_unwind_core.constprop.1+0xa4/0x118
[    7.800000]   warn_slowpath_fmt+0x72/0x158
[    7.800000]   resume_user_mode_begin+0x48/0xf0
[    7.810000] ---[ end trace 6f6a7a8fae20d2f0 ]---

Signed-off-by: Daniel Mentz <danielmentz@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-08-10 10:14:07 -07:00
..
arcregs.h
asm-offsets.h
atomic.h locking/atomic, arch/arc: Fix build 2016-06-20 11:25:49 +02:00
barrier.h ARC: [plat-eznps] Use dedicated SMP barriers 2016-05-09 09:32:33 +05:30
bitops.h ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg 2016-05-09 09:32:33 +05:30
bug.h
cache.h
cacheflush.h
checksum.h
cmpxchg.h ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg 2016-05-09 09:32:33 +05:30
current.h
delay.h
disasm.h
dma-mapping.h
dma.h
elf.h
entry-arcv2.h
entry-compact.h Fix typos 2016-05-30 10:07:32 +05:30
entry.h
exec.h
fb.h
futex.h
highmem.h
hugepage.h arch: fix has_transparent_hugepage() 2016-05-19 19:12:14 -07:00
io.h
irq.h ARC: irq: export some IRQs again 2016-05-09 09:32:30 +05:30
irqflags-arcv2.h
irqflags-compact.h ARC: Call trace_hardirqs_on() before enabling irqs 2016-08-10 10:14:07 -07:00
irqflags.h
Kbuild
kdebug.h
kgdb.h
kmap_types.h
kprobes.h
linkage.h
mach_desc.h
mcip.h
mmu.h
mmu_context.h Fix typos 2016-05-30 10:07:32 +05:30
mmzone.h ARC: support HIGHMEM even without PAE40 2016-05-05 16:35:46 +05:30
module.h
mutex.h
page.h ARC: pae: STRICT_MM_TYPECHECKS was broken 2016-05-13 09:16:09 +05:30
pci.h
perf_event.h
pgalloc.h arc: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
pgtable.h ARC: mm: don't loose PTE_SPECIAL in pte_modify() 2016-07-28 12:38:17 -07:00
processor.h Fix typos 2016-05-30 10:07:32 +05:30
ptrace.h
sections.h
segment.h
serial.h
setup.h ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE 2016-05-09 09:32:33 +05:30
shmparam.h
smp.h Fix typos 2016-05-30 10:07:32 +05:30
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
spinlock_types.h
stacktrace.h
string.h
switch_to.h
syscall.h
syscalls.h
thread_info.h Fix typos 2016-05-30 10:07:32 +05:30
timex.h
tlb-mmu1.h
tlb.h
tlbflush.h
uaccess.h Fix typos 2016-05-30 10:07:32 +05:30
unaligned.h
unwind.h