linux/arch/sh
Stuart Menefy fd78a76aef sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING.
This cleans up the irqflags tracing code quite a bit and ties it
in to various missing callsites that caused an imbalance when
CONFIG_PROVE_LOCKING was enabled.

Previously this was catching on:

 987 #ifdef CONFIG_PROVE_LOCKING
 988     DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
 989     DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
 990 #endif
 991     retval = -EAGAIN;

with hardirqs being doubly enabled, and subsequently bailing out
with the following call trace:

	Call trace:
	[<88035224>] __lock_acquire+0x616/0x6a6
	[<88015a8c>] do_fork+0xf8/0x2b0
	[<880331ec>] trace_hardirqs_on_caller+0xd4/0x114
	[<88241074>] _spin_unlock_irq+0x20/0x64
	[<88035224>] __lock_acquire+0x616/0x6a6
	[<8800386c>] kernel_thread+0x48/0x70
	[<88024ecc>] ____call_usermodehelper+0x0/0x110
	[<88024ecc>] ____call_usermodehelper+0x0/0x110
	[<88003894>] kernel_thread_helper+0x0/0x14
	[<88024bac>] __call_usermodehelper+0x38/0x70
	[<88025dc0>] worker_thread+0x150/0x274
	[<88035b9c>] lock_release+0x0/0x198
	[<88024b74>] __call_usermodehelper+0x0/0x70
	[<88028cf0>] autoremove_wake_function+0x0/0x30
	[<88028bf2>] kthread+0x3e/0x70
	[<88025c70>] worker_thread+0x0/0x274
	[<8800389c>] kernel_thread_helper+0x8/0x14
	[<88028bb4>] kthread+0x0/0x70
	[<88003894>] kernel_thread_helper+0x0/0x14

Reported-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-29 23:01:24 +09:00
..
boards Merge branch 'sh/kfr2r09' 2009-07-23 18:43:48 +09:00
boot Merge branches 'sh/compressors' and 'sh/stable-updates' 2009-07-21 17:37:18 +09:00
cchips sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes. 2009-05-20 11:27:13 +09:00
configs sh: kfr2r09 board support - mach-type and defconfig 2009-07-23 18:43:16 +09:00
drivers sh: pci: Initial PCI-Express support for SH7786 Urquell board. 2009-06-17 18:20:48 +09:00
include sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING. 2009-07-29 23:01:24 +09:00
kernel sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING. 2009-07-29 23:01:24 +09:00
lib sh: Fix up stack overflow check with ftrace disabled. 2009-07-11 21:06:53 +09:00
lib64 sh: Convert sh64 to use the generic checksum code. 2009-06-15 00:00:42 +09:00
math-emu sh: Fix up the math-emu build. 2007-06-11 15:57:42 +09:00
mm Merge branches 'sh/hwblk' and 'sh/platform-updates' 2009-07-20 04:28:11 +09:00
oprofile sh: Add support for SH7724 (SH-Mobile R2R) CPU subtype. 2009-04-16 14:40:56 +09:00
tools sh: kfr2r09 board support - mach-type and defconfig 2009-07-23 18:43:16 +09:00
Kconfig sh: bzip2/lzma zImage support. 2009-07-11 13:21:19 -04:00
Kconfig.cpu sh: Tidy up SH-4A boot_cpu_data.flags probing. 2009-06-01 19:50:08 +09:00
Kconfig.debug sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING. 2009-07-29 23:01:24 +09:00
Makefile Merge branch 'sh/kfr2r09' 2009-07-23 18:43:48 +09:00