watchdog: renesas_wdt: don't sleep in atomic context
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 19 Dec 2020 17:34:15 +0000 (18:34 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 7 Feb 2021 13:41:19 +0000 (14:41 +0100)
commitfa01fa70039cd969acde606672e2b9846205bd0f
treef8f2cc5c66df50150d2a6ae8381959d9d160fba0
parent17f0d1b9bd3333228b5c420f2dae2d7a980636b8
watchdog: renesas_wdt: don't sleep in atomic context

In the restart handler, we hit multiple OOPSes. One because of
usleep_range() and one because of RPM. So, instead of re-using
rwdt_start(), we implement an atomic version of it in the restart
handler. As a little bonus, reboot will occur sooner because we can now
use the smallest divider in the custom restart routine.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20201219173415.21848-1-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/renesas_wdt.c