From mboxrd@z Thu Jan 1 00:00:00 1970 From: u.kleine-koenig@pengutronix.de (Uwe =?iso-8859-1?Q?Kleine-K=F6nig?=) Date: Tue, 18 Oct 2011 20:17:49 +0200 Subject: Warning at kernel/mutex.c In-Reply-To: <20111018173744.GQ21648@n2100.arm.linux.org.uk> References: <20111018173744.GQ21648@n2100.arm.linux.org.uk> Message-ID: <20111018181749.GF21504@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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] [] (unwind_backtrace+0x0/0xf4) from > > [] (warn_slowpath_common+0x4c/0x64) > > [ 0.220000] [] (warn_slowpath_common+0x4c/0x64) from > > [] (warn_slowpath_null+0x1c/0x24) > > [ 0.220000] [] (warn_slowpath_null+0x1c/0x24) from > > [] (mutex_lock_nested+0x260/0x29c) > > [ 0.220000] [] (mutex_lock_nested+0x260/0x29c) from > > [] (clk_enable+0x2c/0x4c) > > [ 0.220000] [] (clk_enable+0x2c/0x4c) from [] > > (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/ |