Skip to contentSkip to conversation

watchdog: mtk_wdt: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()

PATCH Superseded Ao Sun 3 participants 7 messages Jul 29, 2025 – Mar 16

Subsystems (2)
lore
Share & tools
lore

Ao Sun

author
#0 lore raw

PATCH 1/1 watchdog: mtk_wdt: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being awakened and functioning.

To ensure that the watchdog is executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

---
 drivers/watchdog/mtk_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/mtk_wdt.c +1 -1
index d6a6393f609d..5f2179dabd67 100644
@@ -327,7 +327,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
 static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+	 SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
 				mtk_wdt_resume)
 };
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 17 lines · Ao Sun

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being awakened and functioning.

To ensure that the watchdog is executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

---
 drivers/watchdog/mtk_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/mtk_wdt.c +0 -0
index d6a6393f609d..5f2179dabd67 100644

drivers/watchdog/mtk_wdt.c static const struct of_device_id mtk_wdt_dt_ids[] = { · line 331

Quoted 6 lines
drivers/watchdog/mtk_wdt.c +1 -1
@@ -327,7 +327,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
 static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+	 SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
 				mtk_wdt_resume)

Extra space added at beginning of line, and bad multi-line alignment.

Guenter

author
#2 lore raw

PATCH v2 1/1 watchdog: mtk_wdt: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being resumed and functioning.

To ensure that the watchdog is resumed and executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

---
Changes in v2:
- remove extra space, and align multiple lines.

---
 drivers/watchdog/mtk_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/mtk_wdt.c +2 -2
index d6a6393f609d..7dc53409cf99 100644
@@ -327,8 +327,8 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
 static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
-				mtk_wdt_resume)
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+				      mtk_wdt_resume)
 };
 
 static struct platform_driver mtk_wdt_driver = {
Signature · 1 line
2.34.1
maintainer
#3 lore raw
Quoted 10 lines · Ao Sun

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being resumed and functioning.

To ensure that the watchdog is resumed and executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

Did this patch really follow this Sign-off chain ? That seems unlikely.

Guenter

Quoted 25 lines

---
Changes in v2:
- remove extra space, and align multiple lines.

---
 drivers/watchdog/mtk_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/mtk_wdt.c +2 -2
index d6a6393f609d..7dc53409cf99 100644
@@ -327,8 +327,8 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
 static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
-				mtk_wdt_resume)
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+				      mtk_wdt_resume)
 };
 
 static struct platform_driver mtk_wdt_driver = {
Signature · 1 line
2.34.1
author
#4 lore raw

PATCH v3 1/1 watchdog: mtk_wdt: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being resumed and functioning.

To ensure that the watchdog is resumed and executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

---
Changes in v3:
- correct the Signed-off-by.
Changes in v2:
- remove extra space, and align multiple lines.

---
 drivers/watchdog/mtk_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/mtk_wdt.c +2 -2
index d6a6393f609d..7dc53409cf99 100644
@@ -327,8 +327,8 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
 static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
-				mtk_wdt_resume)
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+				      mtk_wdt_resume)
 };
 
 static struct platform_driver mtk_wdt_driver = {
Signature · 1 line
2.34.1
maintainer Reviewed-by on v3 1/1
#5 lore raw
Quoted 8 lines · Ao Sun

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being resumed and functioning.

To ensure that the watchdog is resumed and executed before interrupts are enabled, Use NOIRQ_SYSTEM_SLEEP_PM_OPS().

Quoted 24 lines

---
Changes in v3:
- correct the Signed-off-by.
Changes in v2:
- remove extra space, and align multiple lines.

---
  drivers/watchdog/mtk_wdt.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/mtk_wdt.c +2 -2
index d6a6393f609d..7dc53409cf99 100644
@@ -327,8 +327,8 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
  MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
  static const struct dev_pm_ops mtk_wdt_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
-				mtk_wdt_resume)
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
+				      mtk_wdt_resume)
  };
 
  static struct platform_driver mtk_wdt_driver = {
author
#6 lore raw

PATCH RESEND 1/1 watchdog: mtk_wdt: Use DEFINE_NOIRQ_DEV_PM_OPS()

During the device resume process, an interrupt storm occurs after interrupts are enabled, preventing the watchdog device from being resumed and functioning.

To ensure that the watchdog is resumed and executed before interrupts are enabled, Use DEFINE_NOIRQ_DEV_PM_OPS()

---
Changes in v3:
- correct the Signed-off-by.
Changes in v2:
- remove extra space, and align multiple lines.

---
 drivers/watchdog/mtk_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/mtk_wdt.c +2 -2
index 91d110646e16..c3527bae22af 100644
@@ -507,8 +507,8 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
 
-static DEFINE_SIMPLE_DEV_PM_OPS(mtk_wdt_pm_ops,
-				mtk_wdt_suspend, mtk_wdt_resume);
+static DEFINE_NOIRQ_DEV_PM_OPS(mtk_wdt_pm_ops,
+			       mtk_wdt_suspend, mtk_wdt_resume);
 
 static struct platform_driver mtk_wdt_driver = {
 	.probe		= mtk_wdt_probe,
Signature · 1 line
2.34.1