Hi Biju, CC linux-pm On Wed, Feb 23, 2022 at 5:01 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > This patch fixes the issue 'BUG: Invalid wait context' during restart() > callback by using clk_prepare_enable() instead of pm_runtime_get_sync() > for turning on the clocks during restart. > > This issue is noticed when testing with renesas_defconfig. > > [ 42.213802] reboot: Restarting system > [ 42.217860] > [ 42.219364] ============================= > [ 42.223368] [ BUG: Invalid wait context ] > Fixes: 2cbc5cd0b55fa2 ("watchdog: Add Watchdog Timer driver for RZ/G2L") > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> Thanks for your patch! > --- a/drivers/watchdog/rzg2l_wdt.c > +++ b/drivers/watchdog/rzg2l_wdt.c > @@ -118,7 +120,9 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, > > /* Reset the module before we modify any register */ > reset_control_reset(priv->rstc); > - pm_runtime_get_sync(wdev->parent); > + > + clk_prepare_enable(priv->pclk); > + clk_prepare_enable(priv->osc_clk); I'm not super-happy with this circumvention of Runtime PM, but I don't see a better option, so Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> PM: Is there a better option? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds