All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk <linux-clk@vger.kernel.org>
Subject: Re: clk-lpc18xx-creg - scheduling while atomic
Date: Thu, 5 May 2016 18:11:40 +0300	[thread overview]
Message-ID: <572B62AC.1020205@mleia.com> (raw)
In-Reply-To: <CAGhQ9VxsyWq=GK5RnCzspV3=6NbDNH6pJhf3uZqdNPCsP9VzmQ@mail.gmail.com>

Hi Joachim,

On 05.05.2016 14:53, Joachim Eastwood wrote:
> Hi,
> 
> I just tried next/master on my lpc18xx platform and got a 'scheduling
> while atomic' on the msleep in clk_creg_32k_prepare. This does not
> occur on 4.6-rc1. See below for backtrace.
> 
> According to Documentation/clk.txt, Part 6 - Locking, sleeping is
> allowed in prepare functions. Changing the msleep to an mdelay makes
> the problem go away.
> 
> So any ideas to what is going on?
> 

the bug description resembles a recent problem on iMX7, you may find
details from "clk: imx: do not sleep if IRQ's are still disabled"
thread, the same sleeping clk_core_prepare() from time_init(), while
sleeping is not allowed until the timer is ready.

With best wishes,
Vladimir

> 
> BUG: scheduling while atomic: swapper/0/0x00000002
> CPU: 0 PID: 0 Comm: swapper Not tainted
> 4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
> Hardware name: NXP LPC18xx/43xx (Device Tree)
> [<2800be81>] (unwind_backtrace) from [<2800b22f>] (show_stack+0xb/0xc)
> [<2800b22f>] (show_stack) from [<2801ea21>] (__schedule_bug+0x2d/0x44)
> [<2801ea21>] (__schedule_bug) from [<281dc937>] (__schedule+0x3b/0x268)
> [<281dc937>] (__schedule) from [<281dcbbb>] (schedule+0x57/0x64)
> [<281dcbbb>] (schedule) from [<281de8ef>] (schedule_timeout+0xfb/0x120)
> [<281de8ef>] (schedule_timeout) from [<28030fcd>] (msleep+0xf/0x12)
> [<28030fcd>] (msleep) from [<28165a6d>] (clk_creg_32k_prepare+0x1f/0x24)
> [<28165a6d>] (clk_creg_32k_prepare) from [<281620d5>]
> (clk_core_prepare+0x1d/0x36)
> [<281620d5>] (clk_core_prepare) from [<2816340b>] (clk_register+0x22f/0x318)
> [<2816340b>] (clk_register) from [<282b06c9>] (lpc18xx_creg_clk_init+0x55/0x84)
> [<282b06c9>] (lpc18xx_creg_clk_init) from [<282b0149>] (of_clk_init+0xc1/0x12c)
> [<282b0149>] (of_clk_init) from [<282a665d>] (time_init+0x15/0x20)
> [<282a665d>] (time_init) from [<282a457d>] (start_kernel+0x169/0x274)
> [<282a457d>] (start_kernel) from [<28008025>] (0x28008025)
> bad: scheduling from the idle thread!
> CPU: 0 PID: 0 Comm: swapper Tainted: G W
> 4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
> --
> To unsubscribe from this list: send the line "unsubscribe linux-clk" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2016-05-05 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 11:53 clk-lpc18xx-creg - scheduling while atomic Joachim Eastwood
2016-05-05 15:11 ` Vladimir Zapolskiy [this message]
2016-05-05 16:00   ` Joachim Eastwood
2016-05-06 17:17     ` Stephen Boyd
2016-05-06 17:28       ` Joachim Eastwood
2016-05-06 17:32         ` Stephen Boyd

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=572B62AC.1020205@mleia.com \
    --to=vz@mleia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=mturquette@linaro.org \
    --cc=sboyd@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.