Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH v1] iTCO_wdt: ignore NMI_NOW bit on register comparison
@ 2024-08-26  7:53 Oleksandr Ocheretnyi
  2024-08-26 11:18 ` Mika Westerberg
  0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Ocheretnyi @ 2024-08-26  7:53 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Mika Westerberg, Jean Delvare,
	Wolfram Sang, linux-watchdog, linux-kernel
  Cc: xe-linux-external, Oleksandr Ocheretnyi

Commit da23b6faa8bf ("watchdog: iTCO: Add support for Cannon Lake
PCH iTCO") does not ignore NMI_NOW bit on write operation to TCO1_CNT
register what causes unexpected NMIs due to NMI_NOW bit inversion
during regular crashkernel's workflow with following logs:

iTCO_vendor_support: vendor-support=0
iTCO_wdt iTCO_wdt: unable to reset NO_REBOOT flag, device
                                            disabled by hardware/BIOS

This change clears NMI_NOW bit in the TCO1_CNT register to have no
effect on NMI_NOW bit inversion what can cause NMI immediately.

Fixes: da23b6faa8bf ("watchdog: iTCO: Add support for Cannon Lake PCH iTCO")
Signed-off-by: Oleksandr Ocheretnyi <oocheret@cisco.com>
---
 drivers/watchdog/iTCO_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 264857d314da..679c115ef7d3 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -224,7 +224,7 @@ static int update_no_reboot_bit_cnt(void *priv, bool set)
 		val |= BIT(0);
 	else
 		val &= ~BIT(0);
-	outw(val, TCO1_CNT(p));
+	outw(val & ~BIT(8), TCO1_CNT(p));
 	newval = inw(TCO1_CNT(p));
 
 	/* make sure the update is successful */
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-10-08 16:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26  7:53 [PATCH v1] iTCO_wdt: ignore NMI_NOW bit on register comparison Oleksandr Ocheretnyi
2024-08-26 11:18 ` Mika Westerberg
2024-08-26 15:12   ` Guenter Roeck
2024-08-26 15:15     ` Guenter Roeck
2024-08-26 15:41       ` Guenter Roeck
2024-09-12 14:19         ` [PATCH v2] iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit() call Oleksandr Ocheretnyi
2024-09-12 21:15           ` Guenter Roeck
2024-09-12 21:15           ` Guenter Roeck
2024-09-13 19:14             ` [PATCH v3] " Oleksandr Ocheretnyi
2024-09-17  1:09               ` Guenter Roeck
2024-10-07 15:57                 ` Oleksandr Ocheretnyi
2024-10-08 16:33                   ` Mika Westerberg
2024-09-13  5:29           ` [PATCH v2] " kernel test robot
2024-09-13  7:58           ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox