[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <54088DC4.4020808@elproma.com.pl>
Date: Thu, 04 Sep 2014 18:05:24 +0200
From: Janusz Użycki <j.uzycki@...roma.com.pl>
To: linux-kernel@...r.kernel.org, Wim Van Sebroeck <wim@...ana.be>
Subject: watchdog: WatchDog Timer Driver Core: ping a hardware watchdog in
kernel's space [proposal]
Hi,
Some applications require to start watchdog before userspace software.
This patch enables such feature. Only WATCHDOG_KERNEL_PING flag is
necessary to enable it (attached example for stmp3xxx_rtc_wdt.c).
Moreover kernel's ping is re-enabled when userspace software closed
watchdog using the magic character.
The features improves kernel's reliable if hardware watchdog is available.
* Can you comment the proposed patch?
* Shoud dynamic or static timer_list be used (small structure...)?
* I also added wdd->ops->ref/unref calls but I'm afraid that even
original code is buggy in watchdog_dev.c.
Is any driver that uses the pointers?
In my opinion watchdog_open() should call wdd->ops->ref() before
watchdog_start() and watchdog_release() should call wdd->ops->unref()
before module_put().
Otherwise fault is possible if watchdog module is unloaded.
* I noticed that current watchdog core does not support suspend/resume case.
If you want to use suspend without the patch you need to close a
watchdog in userspace using the magic character before suspend command.
With the patch you must to use WDIOC_SETOPTIONS ioctl and
WDIOS_DISABLECARD/WDIOS_ENABLECARD.
Is there any other method to suspend with watchdog?
best regards
Janusz Uzycki
View attachment "wdt_kernel_ping.diff" of type "text/plain" (4940 bytes)
Powered by blists - more mailing lists