Thread (128 messages) 128 messages, 28 authors, 2012-04-05

Re: OMAP34xx

From: Luciano Coelho <hidden>
Date: 2012-02-16 07:56:36

On Wed, 2012-02-15 at 17:28 -0800, Kevin Hilman wrote: 
NeilBrown [off-list ref] writes:
quoted
On Wed, 15 Feb 2012 16:13:02 -0800 Kevin Hilman [off-list ref]
wrote:
quoted
On 02/15/2012 03:54 PM, Kevin Hilman wrote:
quoted
Luciano Coelho[off-list ref]  writes:

[...]
quoted
I just tried this on my Panda and I keep getting this kind of BUGs.  It
spams my console so much that is pretty much unusable:

[  336.172302] BUG: sleeping function called from invalid context at include/linux/freezer.h:46
[  336.181213] in_atomic(): 0, irqs_disabled(): 128, pid: 1618, name: ntpd
[  336.181213] INFO: lockdep is turned off.
[  336.181213] irq event stamp: 0
[  336.181213] hardirqs last  enabled at (0): [<   (null)>]   (null)
[  336.201660] hardirqs last disabled at (0): [<c0042314>] copy_process+0x3ec/0x105c
[  336.209625] softirqs last  enabled at (0): [<c0042314>] copy_process+0x3ec/0x105c
[  336.217498] softirqs last disabled at (0): [<   (null)>]   (null)
[  336.217498] [<c001e1e4>] (unwind_backtrace+0x0/0x148) from [<c0502c24>] (dump_stack+0x20/0x24)
[  336.232879] [<c0502c24>] (dump_stack+0x20/0x24) from [<c0077998>] (__might_sleep+0x130/0x134)
[  336.232879] [<c0077998>] (__might_sleep+0x130/0x134) from [<c0018998>] (do_signal+0x54/0x600)
[  336.250793] [<c0018998>] (do_signal+0x54/0x600) from [<c0018fa4>] (do_notify_resume+0x60/0x6c)
[  336.250793] [<c0018fa4>] (do_notify_resume+0x60/0x6c) from [<c00154e4>] (work_pending+0x24/0x28)

I have also seen this in 3.3-rc3 (both on Panda (OMAP4460) and on Blaze
(OMAP4430) boards) and I was hoping your tree would have the fix for it,
but it doesn't. :( The device boots and seems to work otherwise, but
this is annoying and looks shaky.

I saw something related to this in another thread from a few months ago,
and one patch proposal by Russell, but I didn't find any conclusion or
any related patch queued up for upstream.

Is there any solution for this? I use a tuned .config (attached) and not
the one generated by omap2plus_defconfig (which I didn't try as
vanilla).
I see the same thing with your ~/.config, but I don't think this is OMAP
specific.  I suspect this will happen on any ARM platform that  has
CONFIG_DEBUG_ATOMIC_SLEEP=y.

It appears to be a problem with the recently added audit support for
ARM, since reverting the commit below makes this BUG go away.
False alarm.  reverting the audit commit didn't make the problem go 
away.  It was gone only because I also disabled 
CONFIG_DEBUG_ATOMIC_SLEEP.  :/

To debug this further, you might bisect it back to v3.2 because the 
problem isn't there in v3.2
I "fixed" this by applying

   https://lkml.org/lkml/2011/8/25/231

as shown here:

http://neil.brown.name/git?p=gta04;a=commitdiff;h=b43a97aefed9990811ed95676db58538f7279eb6

because google found some email that suggested it.  It worked but I didn't
even try to understand the patch.
Great, thanks for the pointer.
I had found this patch also when I searched the list.  That's what I
meant by "one patch proposal by Russell", but it was back in August and
the patch doesn't seem to have been ever applied.  The discussion also
seemed to end abruptly, so my assumption was that no conclusion has been
really reached.

Instead of applying that, I have simply removed the might_sleep() call
in the try_to_freeze() function.  This definitely doesn't solve the
problem, but at least my console doesn't get spammed and it's better
than disabling CONFIG_DEBUG_ATOMIC_SLEEP, because at least I still catch
other sleeps while atomic. ;)

-- 
Cheers,
Luca.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help