linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/2] ARM/MVF600: add Vybrid Family platform support
Date: Wed, 8 May 2013 19:03:43 +0100	[thread overview]
Message-ID: <20130508180343.GN18614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1367480285-26159-2-git-send-email-b35083@freescale.com>

On Thu, May 02, 2013 at 03:38:04PM +0800, Jingchang Lu wrote:
> +void mvf_restart(char mode, const char *cmd)
> +{
> +	struct device_node *np;
> +	void __iomem *wdog_base;
> +	struct clk *wdog_clk;
> +
> +	np = of_find_compatible_node(NULL, NULL, "fsl,mvf-wdt");
> +	wdog_base = of_iomap(np, 0);
> +	if (!wdog_base)
> +		goto soft;
> +
> +	wdog_clk = of_clk_get_by_name(np, "wdog");
> +	if (!IS_ERR(wdog_clk))
> +		clk_prepare_enable(wdog_clk);

I just spotted this in another email.  This is _not_ going to work
reliably.  This path gets called from all sorts of contexts, including
when the system has crashed.  It can also be called from unschedulable
contexts - and the above functions _will_ trigger might_sleep()
warnings as a result.

The only solution to this is to put this setup for this in a separate
function which is called at boot time.

  parent reply	other threads:[~2013-05-08 18:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02  7:38 [PATCH V2 0/2] ARM/MVF600: add Freescale Vybrid Family platform and development board support This Vybird MVF600 family is a heterogeneous dual-core eMPU family combining the ARM Cortex-A5 and Corte-M4 cores. This SOC still shares some IPs with Iscale Vybrid Family SOC and Vybrid Tower development board Jingchang Lu
2013-05-02  7:38 ` [PATCH V2 1/2] ARM/MVF600: add Vybrid Family platform support Jingchang Lu
2013-05-02  8:52   ` Sascha Hauer
2013-05-02  9:20     ` Lu Jingchang-B35083
2013-05-02 16:53   ` Mike Turquette
2013-05-03  7:41   ` Shawn Guo
2013-05-08  7:26     ` Lu Jingchang-B35083
2013-05-08 14:38       ` Shawn Guo
2013-05-08 18:03   ` Russell King - ARM Linux [this message]
2013-05-02  7:38 ` [PATCH V2 2/2] ARM/DTS/MVF600: add basic device tree source for Vybrid Jingchang Lu
2013-05-02  8:56   ` Sascha Hauer
2013-05-06  2:38   ` Shawn Guo
2013-05-03  2:40 ` [PATCH V2 0/2] ARM/MVF600: add Freescale Vybrid Family platform and development board support This Vybird MVF600 family is a heterogeneous dual-core eMPU family combining the ARM Cortex-A5 and Corte-M4 cores. This SOC still shares some IPs with Iscale Vybrid Family SOC and Vybrid Tower development board Shawn Guo

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=20130508180343.GN18614@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).