linux/arch/arm/kernel
Russell King 11b8b25ce4 ARM: fix lockdep unannotated irqs-off warning
Wolfram Sang reported an unannotated irqs-off warning from lockdep:

WARNING: CPU: 0 PID: 282 at kernel/locking/lockdep.c:3557 check_flags+0x84/0x1f4()
DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)
CPU: 0 PID: 282 Comm: rcS Tainted: G        W 4.1.0-00002-g5b076054611833 #179
Hardware name: Generic Emma Mobile EV2 (Flattened Device Tree)
Backtrace:
[<c0012c94>] (dump_backtrace) from [<c0012e3c>] (show_stack+0x18/0x1c)
 r6:c02dcc67 r5:00000009 r4:00000000 r3:00400000
[<c0012e24>] (show_stack) from [<c02510c8>] (dump_stack+0x20/0x28)
[<c02510a8>] (dump_stack) from [<c0022c44>] (warn_slowpath_common+0x8c/0xb4)
[<c0022bb8>] (warn_slowpath_common) from [<c0022cd8>] (warn_slowpath_fmt+0x38/0x40)
 r8:c780f470 r7:00000000 r6:00000000 r5:c03b0570 r4:c0b7ec04
[<c0022ca4>] (warn_slowpath_fmt) from [<c004cd38>] (check_flags+0x84/0x1f4)
 r3:c02e13d8 r2:c02dceaa
[<c004ccb4>] (check_flags) from [<c0050e50>] (lock_acquire+0x4c/0xbc)
 r5:00000000 r4:60000193
[<c0050e04>] (lock_acquire) from [<c0256000>] (_raw_spin_lock+0x34/0x44)
 r9:000a8d5c r8:00000001 r7:c7806000 r6:c780f460 r5:c03b06a0 r4:c780f460
[<c0255fcc>] (_raw_spin_lock) from [<c005a8cc>] (handle_fasteoi_irq+0x20/0x11c)
 r4:c780f400
[<c005a8ac>] (handle_fasteoi_irq) from [<c0057a4c>] (generic_handle_irq+0x28/0x38)
 r6:00000000 r5:c03b038c r4:00000012 r3:c005a8ac
[<c0057a24>] (generic_handle_irq) from [<c0057ae4>] (__handle_domain_irq+0x88/0xa8)
 r4:00000000 r3:00000026
[<c0057a5c>] (__handle_domain_irq) from [<c000a3cc>] (gic_handle_irq+0x40/0x58)
 r8:10c5347d r7:10c5347d r6:c35b1fb0 r5:c03a6304 r4:c8802000 r3:c35b1fb0
[<c000a38c>] (gic_handle_irq) from [<c0013bc8>] (__irq_usr+0x48/0x60)
Exception stack(0xc35b1fb0 to 0xc35b1ff8)
1fa0:                                     00000061 00000000 000ab736 00000066
1fc0: 00000061 000aa1f0 000a8d54 000a8d54 000a8d88 000a8d5c 000a8cc8 000a8d68
1fe0: 72727272 bef8a528 000398c0 00031334 20000010 ffffffff
 r6:ffffffff r5:20000010 r4:00031334 r3:00000061
---[ end trace cb88537fdc8fa202 ]---
possible reason: unannotated irqs-off.
irq event stamp: 769
hardirqs last  enabled at (769): [<c000f82c>] ret_fast_syscall+0x2c/0x54
hardirqs last disabled at (768): [<c000f80c>] ret_fast_syscall+0xc/0x54
softirqs last  enabled at (0): [<c0020ec4>] copy_process.part.65+0x2e8/0x11dc
softirqs last disabled at (0): [<  (null)>]   (null)

His kernel configuration had:
CONFIG_PROVE_LOCKING=y
CONFIG_TRACE_IRQFLAGS=y
but no IRQSOFF_TRACER, which means entry from userspace can result in the
kernel seeing IRQs off without being notified of that change of state.
Change the IRQSOFF ifdef in the usr_entry macro to TRACE_IRQFLAGS instead.

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-07-03 12:42:36 +01:00
..
.gitignore
arch_timer.c
armksyms.c ARM: 8151/1: add missing exports for asm functions required by get_user macro 2014-09-16 16:09:30 +01:00
asm-offsets.c Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
atags.h
atags_compat.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_parse.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_proc.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
bios32.c ARM: 8293/1: kernel: fix pci_mmap_page_range() offset calculation 2015-02-23 14:43:58 +00:00
calls.S ARM: wire up execveat syscall 2015-01-07 20:31:54 +00:00
cpuidle.c ARM: cpuidle: Document the code 2015-03-25 09:53:43 +01:00
crash_dump.c ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr 2014-04-07 12:10:00 +01:00
debug.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
devtree.c arm: Add devicetree fixup machine function 2014-07-29 21:26:49 -06:00
dma-isa.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
dma.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
early_printk.c
elf.c
entry-armv.S ARM: fix lockdep unannotated irqs-off warning 2015-07-03 12:42:36 +01:00
entry-common.S ARM: fix missing syscall trace exit 2015-05-15 11:06:35 +01:00
entry-ftrace.S ARM: move ftrace assembly code to separate file 2014-11-21 15:25:01 +00:00
entry-header.S ARM: 8266/1: Remove early stack deallocation from restore_user_regs 2015-01-12 19:26:57 +00:00
entry-v7m.S ARM: 8295/1: fix v7M build for !CONFIG_PRINTK 2015-01-29 15:23:12 +00:00
fiq.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
fiqasm.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
ftrace.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
head-common.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
head-nommu.S ARM: Fix nommu booting 2015-04-21 15:26:16 +01:00
head.S ARM: 8314/1: replace PROCINFO embedded branch with relative offset 2015-03-28 15:46:14 +00:00
hibernate.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
hw_breakpoint.c perf: Remove type specific target pointers 2015-03-23 10:58:04 +01:00
hyp-stub.S Here are the PPC and ARM changes for KVM, which I separated because 2014-08-07 11:35:30 -07:00
insn.c
io.c ARM: io.c: clean up EXPORT_SYMBOL()s 2014-11-21 15:25:02 +00:00
irq.c ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL 2015-01-16 14:35:33 +00:00
isa.c arm: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
iwmmxt.S ARM: 8221/1: PJ4: allow building in Thumb-2 mode 2014-12-03 16:08:00 +00:00
jump_label.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
kgdb.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
machine_kexec.c ARM: 8338/1: kexec: Relax SMP validation to improve DT compatibility 2015-04-02 09:59:43 +01:00
Makefile Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
module.c ARM: 8219/1: handle interworking and out-of-range relocations separately 2015-02-23 14:43:58 +00:00
opcodes.c
patch.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
perf_callchain.c arm: perf: factor out callchain code 2014-10-30 12:16:58 +00:00
perf_event.c ARM: perf: reject groups spanning multiple hardware PMUs 2015-03-19 19:45:22 +00:00
perf_event_cpu.c ARM: 8357/1: perf: fix memory leak when probing PMU PPIs 2015-05-18 21:51:28 +01:00
perf_event_v6.c arm: perf: kill get_hw_events() 2014-10-30 12:17:00 +00:00
perf_event_v7.c ARM: perf: Add support for Scorpion PMUs 2015-03-17 18:34:01 +00:00
perf_event_xscale.c arm: perf: kill get_hw_events() 2014-10-30 12:17:00 +00:00
perf_regs.c perf: Move task_pt_regs sampling into arch code 2015-01-09 11:12:28 +01:00
pj4-cp0.c ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor 2014-04-25 12:07:34 +01:00
process.c Merge branches 'misc', 'vdso' and 'fixes' into for-next 2015-04-14 22:28:25 +01:00
psci-call.S ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci.c ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci_smp.c ARM: Check if a CPU has gone offline 2014-05-15 10:16:30 -04:00
ptrace.c Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
reboot.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
reboot.h ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
relocate_kernel.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
return_address.c ARM: 8328/1: remove empty preprocessor #else branch 2015-03-28 16:54:53 +00:00
setup.c Merge branches 'misc', 'vdso' and 'fixes' into for-next 2015-04-14 22:28:25 +01:00
signal.c arm: Remove signal translation and exec_domain 2015-04-12 20:58:24 +02:00
sigreturn_codes.S
sleep.S ARM: 8324/1: move cpu_resume() to .text section 2015-03-29 23:11:57 +01:00
smp.c ARM: 8393/1: smp: Fix suspicious RCU usage with ipi tracepoints 2015-06-29 11:02:55 +01:00
smp_scu.c ARM: 8122/1: smp_scu: enable SCU standby support 2014-08-02 08:51:53 +01:00
smp_tlb.c ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15 2014-07-24 14:40:26 +01:00
smp_twd.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
stacktrace.c ARM: 8172/1: Use current_stack_pointer in save_stack_trace_tsk 2014-11-13 23:58:03 +00:00
suspend.c ARM: 8248/1: pm: remove outdated comment 2015-01-21 15:58:57 +00:00
swp_emulate.c ARM: 8322/1: keep .text and .fixup regions closer together 2015-03-29 23:11:56 +01:00
sys_arm.c
sys_oabi-compat.c separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
tcm.c
thumbee.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
time.c ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them 2015-04-03 08:18:23 +02:00
topology.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
traps.c arm: Remove signal translation and exec_domain 2015-04-12 20:58:24 +02:00
unwind.c ARM: 8176/1: Use current_stack_pointer in unwind_backtrace 2014-11-13 23:58:09 +00:00
v7m.c
vdso.c Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
vmlinux.lds.S arm64 updates for 4.1: 2015-04-16 13:58:29 -05:00
xscale-cp0.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00