On 01/18/2016 05:19 AM, Winkler, Tomas wrote:
On Fri, Jan 08, 2016 at 12:49:25AM +0200, Winkler, Tomas wrote:
From: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
For Intel Broadwell and newer platforms, the ME device can inform
the host whether the watchdog functionality is activated or not.
If the watchdog functionality is not activated then the watchdog interface
can be not registered and eliminate unnecessary pings and hence lower
unregister);power consumption by avoiding waking up the device.refcounting"
The feature can be deactivated also without reboot
in that case the watchdog device should be unregistered at runtime.
Signed-off-by: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
V2: rework unregistration
V3: rebase; implement unregistraion also at runtime
V4: Rebase the code over patchset : "watchdog: Replace driver based
drivers/watchdog/mei_wdt.c | 196
1 file changed, 187 insertions(+), 9 deletions(-)[ ... ]
diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
index e7e3f144f2b0..85b27fc5d4ec 100644
+static void mei_wdt_unregister_work(struct work_struct *work)
+ struct mei_wdt *wdt = container_of(work, struct mei_wdt,
internal event (in runtime), so the flow is not already locked by the watchdogsame mutex as unregistration.The unregistration is detected on response from the ping, which is run under+
Registration is synchronous, unregistration is asynchronous.
Assuming that is on purpose, I think it warrants an explanation.
TomasAnd that explains why registration can be synchronous and unregistration
has to be asynchronous ?
You need to connect the dots but yes.
The registration is run from the internal ping request (in probe) or from an
Hope it helps.
What I was asking for is a comment such as
"We can not unregister directly because a ping operation (triggered
through the watchdog subsystem) is pending and must be completed first."
You can put it also that way, but in the bottom line you will get deadlock.
According your comment I'm guessing that you are asking me to update the commit message, please be more direct,Hi Tomas,
I'm not native English speaker and may miss little nuances.