Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context
Date: Thu, 1 Dec 2016 19:47:12 +0530	[thread overview]
Message-ID: <ed09fc5e-395a-5e72-4928-5e85cdc7f2c3@ti.com> (raw)
In-Reply-To: <1480438111-11801-1-git-send-email-abailon@baylibre.com>

On Tuesday 29 November 2016 10:18 PM, Alexandre Bailon wrote:
> Everytime the usb20 phy is enabled, there is a
> "sleeping function called from invalid context" BUG.
> 
> clk_enable() from arch/arm/mach-davinci/clock.c uses spin_lock_irqsave()
> before to invoke the callback usb20_phy_clk_enable().

"before invocation of the callback"? (doesn't read right otherwise)

> usb20_phy_clk_enable() uses clk_get() and clk_enable_prepapre()

clk_prepare_enable()

> which may sleep.
> Move clk_get() to da8xx_register_usb20_phy_clk() and
> replace clk_prepare_enable() by clk_enable().
> 
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>

> @@ -287,9 +281,15 @@ int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin)
>  	struct clk *parent;
>  	int ret = 0;
>  
> +	usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20");
> +	if (IS_ERR(usb20_clk))
> +		return PTR_ERR(parent);

Typo here. Should be PTR_ERR(usb20_clk)

Thanks,
Sekhar

  reply	other threads:[~2016-12-01 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 16:48 [PATCH v2] ARM: davinci: da8xx: Fix sleeping function called from invalid context Alexandre Bailon
2016-12-01 14:17 ` Sekhar Nori [this message]
2016-12-01 14:59   ` Arnd Bergmann
2016-12-01 17:04     ` Alexandre Bailon

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=ed09fc5e-395a-5e72-4928-5e85cdc7f2c3@ti.com \
    --to=nsekhar@ti.com \
    --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