Skip to contentSkip to conversation

watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support

PATCH In review Andy Shevchenko 4 participants 7 messages Sep 24, 2019 – Oct 30, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support

Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined.

---
 drivers/watchdog/intel-mid_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 2cdbd37c700c..470213abfd3d 100644
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
 	wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
 	wdt_dev->parent = dev;
 
+	watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
 	watchdog_set_drvdata(wdt_dev, dev);
 
 	ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,
Signature · 1 line
2.23.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Andy Shevchenko

Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined.

Quoted 17 lines
---
  drivers/watchdog/intel-mid_wdt.c | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 2cdbd37c700c..470213abfd3d 100644
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
  	wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
  	wdt_dev->parent = dev;
 
+	watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
  	watchdog_set_drvdata(wdt_dev, dev);
 
  	ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,
#5 lore raw
In reply to a message not in the archive
Quoted 4 lines · razvan becheriu

PS: sry for sending this several times, I get a message like:
Message may contain a virus
Your message wasn't delivered to [email protected] because it may contain a virus. Learn how to check for and prevent viruses.

You need to send the message as plain text. You may test yourself without spamming people by sending to some other address which you have access to.

All there messages I got have HTML part. Usually it shows MUA misconfiguration.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw
In reply to a message not in the archive

Hi,

regarding the test for the WATCHDOG_NOWAYOUT patch:

```
Tested-by: Razvan Becheriu <[email protected]>
The patch works.
By configuring the CONFIG_WATCHDOG_NOWAYOUT in the kernel and stopping
the watchdog.service, the board reboots.
Previously, the watchdog.service was able to disable the watchdog
counter, and no reboot was performed.
```

Thank you,
Razvan

Quoted 44 lines · razvan becheriu

Hi,

regarding the test for the WATCHDOG_NOWAYOUT patch:

...

The patch works.
By configuring the CONFIG_WATCHDOG_NOWAYOUT in the kernel and stopping the watchdog.service, the board reboots. Previously, the watchdog.service was able to disable the watchdog counter, and no reboot was performed.
...

Thank you,
Razvan

Quoted 28 lines · Andy Shevchenko

Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined.

---
 drivers/watchdog/intel-mid_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -1
index 2cdbd37c700c..470213abfd3d 100644
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
        wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
        wdt_dev->parent = dev;
 
+       watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
        watchdog_set_drvdata(wdt_dev, dev);
 
        ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,
--

2.23.0

#8 lore raw
Quoted 10 lines · razvan becheriu

regarding the test for the WATCHDOG_NOWAYOUT patch:

```
Tested-by: Razvan Becheriu <[email protected]>
The patch works.
By configuring the CONFIG_WATCHDOG_NOWAYOUT in the kernel and stopping
the watchdog.service, the board reboots.
Previously, the watchdog.service was able to disable the watchdog
counter, and no reboot was performed.
```

Thank you!

Now you can find it in archives [1].

[1]: https://lore.kernel.org/linux-watchdog/CAJAoKi_C85WDxu_XppFhn7BjZC1GznqQrPFKW9W2wEpHzz4wPw@mail.gmail.com/T/#t

For the future, please avoid top postings.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Guenter Roeck

Op 30-09-2019 om 15:15 schreef Guenter Roeck:

Quoted 11 lines · Andy Shevchenko
Quoted 8 lines

Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined.

Any chance of this going in v5.4?

Quoted 17 lines
Quoted 16 lines

---
  drivers/watchdog/intel-mid_wdt.c | 1 +

  1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 2cdbd37c700c..470213abfd3d 100644
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device 
 *pdev)
       wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
       wdt_dev->parent = dev;
+    watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
       watchdog_set_drvdata(wdt_dev, dev);
       ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,
 
maintainer
#3 lore raw
Quoted 7 lines · Ferry Toth

Op 30-09-2019 om 15:15 schreef Guenter Roeck:

Quoted 6 lines · Andy Shevchenko
Quoted 5 lines

Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Any chance of this going in v5.4?

Good question. There are a few other pending bug fixes, including one which fixes a build failure. Wim, any chance you can queue those up ?

Thanks,
Guenter

Quoted 18 lines
Quoted 16 lines
Quoted 15 lines

---
  drivers/watchdog/intel-mid_wdt.c | 1 +

  1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 2cdbd37c700c..470213abfd3d 100644
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
       wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
       wdt_dev->parent = dev;
+    watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
       watchdog_set_drvdata(wdt_dev, dev);
       ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,