]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
twl3040-gpio: fix task softlockup warning
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 18 Aug 2008 15:54:57 +0000 (18:54 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 19 Aug 2008 06:37:48 +0000 (09:37 +0300)
commit0cbe44841b1b5b99afb011b84300b2a30f14df0f
tree14ca5fd99812a1ceeab3c5f4a1dcd0721217c0ce
parentef05b8396b1685f994ffb518680d82075fce3b99
twl3040-gpio: fix task softlockup warning

This patch fixes the following annoying warning:

INFO: task twl4030 gpio:283 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
twl4030 gpio  D c027e9dc     0   283      2
[<c027e744>] (schedule+0x0/0x314) from [<c00640f0>] (kthread+0x3c/0x80)
[<c00640b4>] (kthread+0x0/0x80) from [<c0052678>] (do_exit+0x0/0x664)
 r5:00000000 r4:00000000

Which is printed every 120 seconds by the softlockup code (see
'check_hung_task()' function, introduced by on Jan 2008 by commit
82a1fcb90287052aabfa235e7ffc693ea003fe69).

The reason is that the "twl4030 gpio" kthread is created but is not started
immediatelly. And in fact it may never start, because TWL3040 interrupts
may never happen and hence, the 'twl4030_gpio_unmask_irqchip()' function
is never run. This makes the softlockup detection code unhappy.

Fix this by running the "twl4030 gpio" kernel thread in at the end of the
'gpio_twl4030_init()' initialization function. Since the 'gpio_pending_unmask'
global variable is 0 at that time, the tread ('twl4030_gpio_unmask_thread()')
will effectively do nothing and go sleep. This makes the softlocup detection
code happy.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/twl4030-gpio.c