Biju Das
e4cf89596c
watchdog: rzg2l_wdt: Fix 'BUG: Invalid wait context'
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 ]
[ 42.227372] 5.17.0-rc5-arm64-renesas-00002-g10393723e35e #522 Not tainted
[ 42.234153] -----------------------------
[ 42.238155] systemd-shutdow/1 is trying to lock:
[ 42.242766] ffff00000a650828 (&genpd->mlock){+.+.}-{3:3}, at: genpd_lock_mtx+0x14/0x20
[ 42.250709] other info that might help us debug this:
[ 42.255753] context-{4:4}
[ 42.258368] 2 locks held by systemd-shutdow/1:
[ 42.262806] #0: ffff80000944e1c8 (system_transition_mutex#2){+.+.}-{3:3}, at: __do_sys_reboot+0xd0/0x250
[ 42.272388] #1: ffff8000094c4e40 (rcu_read_lock){....}-{1:2}, at: atomic_notifier_call_chain+0x0/0x150
[ 42.281795] stack backtrace:
[ 42.284672] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 5.17.0-rc5-arm64-renesas-00002-g10393723e35e #522
[ 42.294577] Hardware name: Renesas SMARC EVK based on r9a07g044c2 (DT)
[ 42.301096] Call trace:
[ 42.303538] dump_backtrace+0xcc/0xd8
[ 42.307203] show_stack+0x14/0x30
[ 42.310517] dump_stack_lvl+0x88/0xb0
[ 42.314180] dump_stack+0x14/0x2c
[ 42.317492] __lock_acquire+0x1b24/0x1b50
[ 42.321502] lock_acquire+0x120/0x3a8
[ 42.325162] __mutex_lock+0x84/0x8f8
[ 42.328737] mutex_lock_nested+0x30/0x58
[ 42.332658] genpd_lock_mtx+0x14/0x20
[ 42.336319] genpd_runtime_resume+0xc4/0x228
[ 42.340587] __rpm_callback+0x44/0x170
[ 42.344337] rpm_callback+0x64/0x70
[ 42.347824] rpm_resume+0x4e0/0x6b8
[ 42.351310] __pm_runtime_resume+0x50/0x78
[ 42.355404] rzg2l_wdt_restart+0x28/0x68
[ 42.359329] watchdog_restart_notifier+0x1c/0x30
[ 42.363943] atomic_notifier_call_chain+0x94/0x150
[ 42.368732] do_kernel_restart+0x24/0x30
[ 42.372652] machine_restart+0x44/0x70
[ 42.376399] kernel_restart+0x3c/0x60
[ 42.380058] __do_sys_reboot+0x228/0x250
[ 42.383977] __arm64_sys_reboot+0x20/0x28
[ 42.387983] invoke_syscall+0x40/0xf8
Fixes: 2cbc5cd0b5 ("watchdog: Add Watchdog Timer driver for RZ/G2L")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220225175320.11041-4-biju.das.jz@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2022-05-08 10:34:01 +02:00
..
2022-04-21 19:58:14 +02:00
2022-04-22 17:22:51 +02:00
2022-04-22 08:45:06 +09:00
2022-03-17 13:56:58 -07:00
2022-03-18 20:31:14 +01:00
2022-04-30 10:24:21 -07:00
2022-03-25 13:35:34 -07:00
2022-04-27 09:41:54 -07:00
2022-03-18 17:12:09 +01:00
2022-05-01 09:30:47 -07:00
2022-04-06 08:47:52 -06:00
2022-04-25 17:26:40 +02:00
2022-04-25 16:47:24 -07:00
2022-03-23 18:03:08 -07:00
2022-03-28 12:27:35 -07:00
2022-04-26 12:08:31 +05:30
2022-04-19 17:42:08 -07:00
2022-03-31 13:57:15 -07:00
2022-04-08 12:59:43 -07:00
2022-03-24 18:12:09 -07:00
2022-04-20 17:24:43 +05:30
2022-03-29 09:14:30 +02:00
2022-04-14 14:44:49 +02:00
2022-04-22 13:11:38 -07:00
2022-04-22 13:59:19 -07:00
2022-04-29 10:27:05 +10:00
2022-04-01 10:14:32 -07:00
2022-04-07 06:35:34 -10:00
2022-03-28 12:27:35 -07:00
2022-03-11 14:56:57 -06:00
2022-03-28 12:27:35 -07:00
2022-04-15 23:49:02 +02:00
2022-03-08 22:33:52 +01:00
2022-04-27 20:36:47 +02:00
2022-04-16 15:03:58 +01:00
2022-04-08 15:40:06 -03:00
2022-04-23 09:52:07 -07:00
2022-04-14 09:47:16 +03:00
2022-04-08 11:16:29 +02:00
2022-04-05 16:33:47 +01:00
2022-03-21 13:26:38 +00:00
2022-03-27 14:09:48 -07:00
2022-03-12 19:33:30 -06:00
2022-04-23 09:46:44 -07:00
2022-04-09 17:45:49 +02:00
2022-04-21 17:00:24 +02:00
2022-04-06 22:28:07 -04:00
2022-03-25 13:56:18 -07:00
2022-04-24 17:25:10 +02:00
2022-04-08 11:00:08 +02:00
2022-04-21 09:29:07 +02:00
2022-04-28 09:46:18 -07:00
2022-03-21 18:33:57 -07:00
2022-03-30 10:04:11 -07:00
2022-04-15 06:56:17 +02:00
2022-03-18 14:08:36 +01:00
2022-03-28 12:27:35 -07:00
2022-03-29 21:37:12 +02:00
2022-03-18 14:01:41 +01:00
2022-04-07 06:35:34 -10:00
2022-04-13 11:48:45 +01:00
2022-04-20 14:42:44 +05:30
2022-04-24 16:24:09 +02:00
2022-04-27 16:55:54 +02:00
2022-03-21 14:46:01 -07:00
2022-04-13 12:05:22 +02:00
2022-03-18 14:01:19 +01:00
2022-03-30 12:08:11 -07:00
2022-04-04 08:59:43 +01:00
2022-03-30 10:50:48 -07:00
2022-04-04 11:14:13 +02:00
2022-03-13 11:49:53 -05:00
2022-04-01 09:37:18 -07:00
2022-03-27 22:18:39 +02:00
2022-04-18 22:48:31 -04:00
2022-04-10 09:32:08 +08:00
2022-03-28 12:27:35 -07:00
2022-04-19 10:30:43 -07:00
2022-04-04 16:35:20 +02:00
2022-04-27 22:40:09 -04:00
2022-04-05 08:56:26 +02:00
2022-04-28 16:51:24 +02:00
2022-03-28 12:27:35 -07:00
2022-04-26 08:09:46 +02:00
2022-04-26 14:10:54 +02:00
2022-04-05 10:40:52 -07:00
2022-04-13 11:37:44 -06:00
2022-03-31 13:57:15 -07:00
2022-04-26 11:32:01 -07:00
2022-03-31 14:51:34 -07:00
2022-04-05 10:40:52 -07:00
2022-03-18 14:07:09 +01:00
2022-05-08 10:34:01 +02:00
2022-04-20 15:22:18 -05:00