linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: Warning at kernel/mutex.c
Date: Tue, 18 Oct 2011 20:17:49 +0200	[thread overview]
Message-ID: <20111018181749.GF21504@pengutronix.de> (raw)
In-Reply-To: <20111018173744.GQ21648@n2100.arm.linux.org.uk>

On Tue, Oct 18, 2011 at 06:37:44PM +0100, Russell King - ARM Linux wrote:
> On Tue, Oct 18, 2011 at 02:43:27PM -0200, Fabio Estevam wrote:
> > Hi,
> > 
> > I am running 3.1-rc10 kernel built with mxs_defconfig on a MX28EVK
> > board and I am getting the following:
> > 
> > [    0.200000] Switching to clocksource mxs_timer
> > [    0.220000] Switched to NOHz mode on CPU #0
> > [    0.220000] ------------[ cut here ]------------
> > [    0.220000] WARNING: at kernel/mutex.c:198 mutex_lock_nested+0x260/0x29c()
> > [    0.220000] Modules linked in:
> > [    0.220000] [<c0014478>] (unwind_backtrace+0x0/0xf4) from
> > [<c002630c>] (warn_slowpath_common+0x4c/0x64)
> > [    0.220000] [<c002630c>] (warn_slowpath_common+0x4c/0x64) from
> > [<c0026340>] (warn_slowpath_null+0x1c/0x24)
> > [    0.220000] [<c0026340>] (warn_slowpath_null+0x1c/0x24) from
> > [<c02957cc>] (mutex_lock_nested+0x260/0x29c)
> > [    0.220000] [<c02957cc>] (mutex_lock_nested+0x260/0x29c) from
> > [<c0018580>] (clk_enable+0x2c/0x4c)
> > [    0.220000] [<c0018580>] (clk_enable+0x2c/0x4c) from [<c01cd9e0>]
> > (pl011_console_write+0x20/0x78)
> 
> clk_enable() shouldn't be taking a mutex because drivers can _and_ do
> call it from non-schedulable contexts.  Unfortunately, some clk_enable
> implementations do use a mutex.
> 
> We have a transition path for this, discussed quite a while ago -
> introducing clk_prepare() to do the slow bits of enabling a clock,
> leaving clk_enable() for the fast stuff.
> 
And some time ago I posted a work-around with the obvious downside of
having the clock on longer than necessary. You can find it at

	http://mid.gmane.org/1293117682-18505-1-git-send-email-u.kleine-koenig at pengutronix.de

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-10-18 18:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 16:43 Warning at kernel/mutex.c Fabio Estevam
2011-10-18 17:37 ` Russell King - ARM Linux
2011-10-18 18:17   ` Uwe Kleine-König [this message]
2011-10-18 18:33   ` Fabio Estevam
2011-10-18 18:40     ` Uwe Kleine-König
2011-10-18 18:45       ` Fabio Estevam
2011-10-19  6:46         ` Sascha Hauer
2011-10-19  6:54           ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111018181749.GF21504@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).