linux-kernel-test/arch/arm
Ming Lei 9fc2552a68 ARM: 6952/1: fix lockdep warning of "unannotated irqs-off"
This patch fixes the lockdep warning of "unannotated irqs-off"[1].

After entering __irq_usr, arm core will disable interrupt automatically,
but __irq_usr does not annotate the irq disable, so lockdep may complain
the warning if it has chance to check this in irq handler.

This patch adds trace_hardirqs_off in __irq_usr before entering irq_handler
to handle the irq, also calls ret_to_user_from_irq to avoid calling
disable_irq again.

This is also a fix for irq off tracer.

[1], lockdep warning log of "unannotated irqs-off"

[   13.804687] ------------[ cut here ]------------
[   13.809570] WARNING: at kernel/lockdep.c:3335 check_flags+0x78/0x1d0()
[   13.816467] Modules linked in:
[   13.819732] Backtrace:
[   13.822357] [<c01cb42c>] (dump_backtrace+0x0/0x100) from [<c06abb14>] (dump_stack+0x20/0x24)
[   13.831268]  r6:c07d8c2c r5:00000d07 r4:00000000 r3:00000000
[   13.837280] [<c06abaf4>] (dump_stack+0x0/0x24) from [<c01ffc04>] (warn_slowpath_common+0x5c/0x74)
[   13.846649] [<c01ffba8>] (warn_slowpath_common+0x0/0x74) from [<c01ffc48>] (warn_slowpath_null+0x2c/0x34)
[   13.856781]  r8:00000000 r7:00000000 r6:c18b8194 r5:60000093 r4:ef182000
[   13.863708] r3:00000009
[   13.866485] [<c01ffc1c>] (warn_slowpath_null+0x0/0x34) from [<c0237d84>] (check_flags+0x78/0x1d0)
[   13.875823] [<c0237d0c>] (check_flags+0x0/0x1d0) from [<c023afc8>] (lock_acquire+0x4c/0x150)
[   13.884704] [<c023af7c>] (lock_acquire+0x0/0x150) from [<c06af638>] (_raw_spin_lock+0x4c/0x84)
[   13.893798] [<c06af5ec>] (_raw_spin_lock+0x0/0x84) from [<c01f9a44>] (sched_ttwu_pending+0x58/0x8c)
[   13.903320]  r6:ef92d040 r5:00000003 r4:c18b8180
[   13.908233] [<c01f99ec>] (sched_ttwu_pending+0x0/0x8c) from [<c01f9a90>] (scheduler_ipi+0x18/0x1c)
[   13.917663]  r6:ef183fb0 r5:00000003 r4:00000000 r3:00000001
[   13.923645] [<c01f9a78>] (scheduler_ipi+0x0/0x1c) from [<c01bc458>] (do_IPI+0x9c/0xfc)
[   13.932006] [<c01bc3bc>] (do_IPI+0x0/0xfc) from [<c06b0888>] (__irq_usr+0x48/0xe0)
[   13.939971] Exception stack(0xef183fb0 to 0xef183ff8)
[   13.945281] 3fa0:                                     ffffffc3 0001500c 00000001 0001500c
[   13.953948] 3fc0: 00000050 400b45f0 400d9000 00000000 00000001 400d9600 6474e552 bea05b3c
[   13.962585] 3fe0: 400d96c0 bea059c0 400b6574 400b65d8 20000010 ffffffff
[   13.969573]  r6:00000403 r5:fa240100 r4:ffffffff r3:20000010
[   13.975585] ---[ end trace efc4896ab0fb62cb ]---
[   13.980468] possible reason: unannotated irqs-off.
[   13.985534] irq event stamp: 1610
[   13.989044] hardirqs last  enabled at (1610): [<c01c703c>] no_work_pending+0x8/0x2c
[   13.997131] hardirqs last disabled at (1609): [<c01c7024>] ret_slow_syscall+0xc/0x1c
[   14.005371] softirqs last  enabled at (0): [<c01fe5e4>] copy_process+0x2cc/0xa24
[   14.013183] softirqs last disabled at (0): [<  (null)>]   (null)

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-06-06 10:56:22 +01:00
..
boot Merge branch 'devel-stable' into for-linus 2011-05-23 19:28:04 +01:00
common Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2011-05-25 21:47:48 +01:00
configs Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-27 19:51:32 -07:00
include/asm Merge branch 'setns' 2011-05-28 10:51:01 -07:00
kernel ARM: 6952/1: fix lockdep warning of "unannotated irqs-off" 2011-06-06 10:56:22 +01:00
lib ARM: 6945/1: Add unwinding support for division functions 2011-05-27 22:56:53 +01:00
mach-at91 at91: drop at572d940hf support 2011-05-25 23:04:35 +08:00
mach-bcmring ARM: bcmring: convert to use sp804 clockevents 2011-05-23 18:04:54 +01:00
mach-clps711x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-cns3xxx
mach-davinci Merge branch 'davinci-next' of git://gitorious.org/linux-davinci/linux-davinci into devel-stable 2011-05-25 00:11:25 +01:00
mach-dove ARM: dove: Consolidate mpp code with platform mpp. 2011-05-16 15:49:31 -04:00
mach-ebsa110 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ep93xx ARM: 6852/1: EP93xx: Remove ep93xx_gpio_dbg_show function 2011-05-11 12:37:18 +01:00
mach-exynos4 Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6 2011-05-28 10:56:34 -07:00
mach-footbridge clocksource: convert footbridge to generic i8253 clocksource 2011-05-14 10:29:48 +01:00
mach-gemini Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
mach-h720x ARM: Replace platform definition of ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS 2011-05-12 08:36:49 +01:00
mach-imx ARM: imx: move mx3 support to mach-imx 2011-05-19 13:11:38 +02:00
mach-integrator Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-iop13xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-iop32x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-iop33x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-ixp4xx Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
mach-ixp23xx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ixp2000 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-kirkwood ARM: orion: Refactor the MPP code common in the orion platform 2011-05-16 15:25:54 -04:00
mach-ks8695 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-l7200/include/mach
mach-loki ARM: orion: Consolidate ethernet platform data 2011-05-16 15:06:01 -04:00
mach-lpc32xx clocksource: convert ARM 32-bit up counting clocksources 2011-05-23 18:04:51 +01:00
mach-mmp Merge branch 'zImage_fixes' of git://git.linaro.org/people/nico/linux into devel-stable 2011-05-07 08:34:02 +01:00
mach-msm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-23 15:15:27 -07:00
mach-mv78xx0 ARM: orion: Refactor the MPP code common in the orion platform 2011-05-16 15:25:54 -04:00
mach-mx5 ARM: mxc: don't allow to compile together i.MX51 and i.MX53 2011-05-19 13:11:30 +02:00
mach-mxs Merge branch 'devel-stable' into for-linus 2011-05-23 19:28:04 +01:00
mach-netx ARM: 6827/1: mach-netx: delete hardcoded periphid 2011-05-26 10:33:34 +01:00
mach-nomadik gpio: move Nomadik GPIO driver to drivers/gpio 2011-05-26 17:30:03 -06:00
mach-nuc93x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-omap1 Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-omap2 Merge git://git.infradead.org/battery-2.6 2011-05-27 10:12:35 -07:00
mach-orion5x ARM: orion5x: Refactor mpp code to use common orion platform mpp. 2011-05-16 15:42:59 -04:00
mach-pnx4008 arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
mach-pxa Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
mach-realview Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-rpc ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-s3c24a0/include/mach
mach-s3c64xx Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2011-05-25 21:47:48 +01:00
mach-s3c2400
mach-s3c2410 Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
mach-s3c2412 ARM / Samsung: Use struct syscore_ops for "core" power management 2011-04-24 19:16:10 +02:00
mach-s3c2416 Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-05-23 12:33:02 -07:00
mach-s3c2440 ARM / Samsung: Use struct syscore_ops for "core" power management 2011-04-24 19:16:10 +02:00
mach-s3c2443 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s5p64x0 ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-s5pc100 gpio: Move the s5pc100 GPIO to drivers/gpio 2011-05-26 17:33:41 -06:00
mach-s5pv210 gpio: Move the s5pv210 GPIO to drivers/gpio 2011-05-26 17:33:37 -06:00
mach-sa1100 Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-shark ARM: use ARM_DMA_ZONE_SIZE to adjust the zone sizes 2011-05-12 08:36:53 +01:00
mach-shmobile ARM: mach-shmobile: mackerel: add renesas_usbhs support for USB1 2011-05-25 17:07:36 +09:00
mach-spear3xx ARM: 6931/1: SPEAr3xx: Rework KConfig to allow all boards to be compiled in 2011-05-20 22:34:25 +01:00
mach-spear6xx ARM: 6934/1: SPEAr6xx: Rework Kconfig for single image solution 2011-05-20 22:34:25 +01:00
mach-tcc8k clocksource: convert ARM 32-bit up counting clocksources 2011-05-23 18:04:51 +01:00
mach-tegra Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc 2011-05-25 16:55:55 -07:00
mach-u300 ARM: 6947/2: mach-u300: fix compilation error in timer 2011-06-06 10:56:10 +01:00
mach-ux500 Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6 2011-05-28 10:56:34 -07:00
mach-versatile Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-vexpress ARM: 6946/1: vexpress: move v2m clock init to init_early 2011-06-06 10:56:09 +01:00
mach-vt8500 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-w90x900 Merge branch 'devel-stable' into for-linus 2011-05-23 19:28:04 +01:00
mm ARM: 6951/1: include .bss in memory layout information 2011-06-06 10:56:10 +01:00
nwfpe
oprofile
plat-iop ARM: Remove duplicate linux/sched.h include from arch/arm/plat-iop/time.c 2011-04-10 17:01:02 +02:00
plat-mxc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-23 15:15:27 -07:00
plat-nomadik gpio/nomadik: add function to read GPIO pull down status 2011-05-26 17:30:18 -06:00
plat-omap Merge branch 'for_2.6.40/gpio-move' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into gpio/next 2011-05-27 23:52:58 -06:00
plat-orion Merge branch 'devel-stable' into for-linus 2011-05-23 19:28:04 +01:00
plat-pxa ARM / PXA: Use struct syscore_ops for "core" power management 2011-04-24 19:16:09 +02:00
plat-s3c24xx Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-05-23 12:33:02 -07:00
plat-s5p Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2011-05-25 21:47:48 +01:00
plat-samsung Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6 2011-05-28 10:56:34 -07:00
plat-spear Merge branches 'consolidate', 'ep93xx', 'fixes', 'misc', 'mmci', 'remove' and 'spear' into for-linus 2011-05-23 19:27:40 +01:00
plat-tcc
plat-versatile ARM: consolidate SMP cross call implementation 2011-05-23 16:53:17 +01:00
tools ARM: Update mach-types 2011-05-14 21:36:55 +01:00
vfp ARM: Use struct syscore_ops instead of sysdevs for PM in common code 2011-04-24 19:16:08 +02:00
Kconfig Merge branches 'devel', 'devel-stable' and 'fixes' into for-linus 2011-05-27 22:59:57 +01:00
Kconfig-nommu Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2011-05-25 21:47:48 +01:00