Message ID | CAD56B7eAZ0hb0kuRbALONMAgvuhHjqrShVRwf1s93ZSbv8xqww@mail.gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | watchdog: watchdog_stop_on_reboot() | expand |
On 1/18/21 9:39 AM, Paul Thomas wrote: > Hello, > > I'm going through our out-of-tree commits, and was wondering if there > is anything to be done with this one. Basically we remove both > watchdog_stop_on_reboot() calls (not sure why there are two to begin > with): Those were there from the beginning, only hand coded. One was implemented using a shutdown notifier, one as shutdown callback. Over time both were converted to use the watchdog API, without me or anyone else noticing that the second call is redundant. > --- a/drivers/watchdog/cadence_wdt.c > +++ b/drivers/watchdog/cadence_wdt.c > @@ -330,7 +330,6 @@ static int cdns_wdt_probe(struct platform_device *pdev) > > watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev); > watchdog_set_nowayout(cdns_wdt_device, nowayout); > - watchdog_stop_on_reboot(cdns_wdt_device); > watchdog_set_drvdata(cdns_wdt_device, wdt); > > wdt->clk = devm_clk_get(dev, NULL); > @@ -359,7 +358,6 @@ static int cdns_wdt_probe(struct platform_device *pdev) > > spin_lock_init(&wdt->io_lock); > > - watchdog_stop_on_reboot(cdns_wdt_device); > watchdog_stop_on_unregister(cdns_wdt_device); > ret = devm_watchdog_register_device(dev, cdns_wdt_device); > if (ret) > > This seems to save us in certain conditions where the Software System > Reset fails[1]. I'm not sure if there's other use cases where you > really do want the watchdog to stop on reboot? > Good question. Unfortunately I don't have an answer. I am fine with removing both. Guenter > This is on an arm64 Zyny Ultrascale+ platform. > > -Paul > > [1] The one reproducible example of the Software System Reset failing > I have for our system is after a kernel oops from removing the > xilinx_dma module. > https://lore.kernel.org/lkml/CAD56B7d_9+0XuOBysxW=CADLTG_7RybBTM8hCYKSigB8ie8E_g@mail.gmail.com/ >
--- a/drivers/watchdog/cadence_wdt.c +++ b/drivers/watchdog/cadence_wdt.c @@ -330,7 +330,6 @@ static int cdns_wdt_probe(struct platform_device *pdev) watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev); watchdog_set_nowayout(cdns_wdt_device, nowayout); - watchdog_stop_on_reboot(cdns_wdt_device); watchdog_set_drvdata(cdns_wdt_device, wdt); wdt->clk = devm_clk_get(dev, NULL); @@ -359,7 +358,6 @@ static int cdns_wdt_probe(struct platform_device *pdev) spin_lock_init(&wdt->io_lock); - watchdog_stop_on_reboot(cdns_wdt_device); watchdog_stop_on_unregister(cdns_wdt_device); ret = devm_watchdog_register_device(dev, cdns_wdt_device); if (ret)