[PATCH V2 1/2] ARM/MVF600: add Vybrid Family platform support
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed May 8 14:03:43 EDT 2013
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.
More information about the linux-arm-kernel
mailing list