History log of /openbmc/linux/drivers/watchdog/watchdog_dev.c (Results 76 – 100 of 179)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v3.5-rc4, v3.5-rc3, v3.5-rc2, v3.5-rc1
# e907df32 22-May-2012 Hans de Goede <hdegoede@redhat.com>

watchdog: Add support for dynamically allocated watchdog_device structs

If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the mo

watchdog: Add support for dynamically allocated watchdog_device structs

If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the module is not enough,
even with a drivers module locked, the driver can be unbound from the device,
examples:
1) The root user can unbind it through sysfd
2) The i2c bus master driver being unloaded for an i2c watchdog

I will gladly admit that these are corner cases, but we still need to handle
them correctly.

The fix for this consists of 2 parts:
1) Add ref / unref operations, so that the driver can refcount the struct
holding the watchdog_device struct and delay freeing it until any
open filehandles referring to it are closed
2) Most driver operations will do IO on the device and the driver should not
do any IO on the device after it has been unbound. Rather then letting each
driver deal with this internally, it is better to ensure at the watchdog
core level that no operations (other then unref) will get called after
the driver has called watchdog_unregister_device(). This actually is the
bulk of this patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# f4e9c82f 22-May-2012 Hans de Goede <hdegoede@redhat.com>

watchdog: Add Locking support

This patch fixes some potential multithreading issues, despite only
allowing one process to open the /dev/watchdog device, we can still get
called multiple times at the

watchdog: Add Locking support

This patch fixes some potential multithreading issues, despite only
allowing one process to open the /dev/watchdog device, we can still get
called multiple times at the same time, since a program could be using thread,
or could share the fd after a fork.

This causes 2 potential problems:
1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
if these 2 race, the watchdog could be stopped while the active
bit indicates it is running or visa versa.

2) Most watchdog_dev drivers probably assume that only one
watchdog-op will get called at a time, this is not necessary
true atm.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 7a879824 22-May-2012 Hans de Goede <hdegoede@redhat.com>

watchdog: watchdog_dev: Rewrite wrapper code

Rewrite and extend the wrapper code so that we can easily introduce
locking (this to be able to prevent potential multithreading issues).

Signed-off-by:

watchdog: watchdog_dev: Rewrite wrapper code

Rewrite and extend the wrapper code so that we can easily introduce
locking (this to be able to prevent potential multithreading issues).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


Revision tags: v3.4, v3.4-rc7
# 3dfd6218 11-May-2012 Alan Cox <alan@linux.intel.com>

watchdog: use dev_ functions

While they are registered all our watchdogs now have a valid device object
so we can in turn use that to report problems nicely.

Signed-off-by: Alan Cox <alan@linux.int

watchdog: use dev_ functions

While they are registered all our watchdogs now have a valid device object
so we can in turn use that to report problems nicely.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# d6b469d9 11-May-2012 Alan Cox <alan@linux.intel.com>

watchdog: create all the proper device files

Create the watchdog class and it's associated devices.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

watchdog: create all the proper device files

Create the watchdog class and it's associated devices.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 45f5fed3 10-May-2012 Alan Cox <alan@linux.intel.com>

watchdog: Add multiple device support

We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc d

watchdog: Add multiple device support

We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc driver layer tweaked for watchdog.

Revised to fix problems noted by Hans de Goede

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 6cfb5aa8 21-May-2012 Wim Van Sebroeck <wim@iguana.be>

watchdog: correct the name of the watchdog_core inlude file

The watchdog_core include file should have been named
watchdog_core.h and not watchdog_dev.h . Correct this.

Signed-off-by: Wim Van Sebro

watchdog: correct the name of the watchdog_core inlude file

The watchdog_core include file should have been named
watchdog_core.h and not watchdog_dev.h . Correct this.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


Revision tags: v3.4-rc6, v3.4-rc5, v3.4-rc4, v3.4-rc3, v3.4-rc2, v3.4-rc1, v3.3
# 257f8c4a 11-Mar-2012 Viresh Kumar <viresh.kumar@st.com>

watchdog: Add watchdog_active() routine

Some watchdog may need to check if watchdog is ACTIVE or not, for example in
their suspend/resume hooks.

This patch adds this routine and changes the core dr

watchdog: Add watchdog_active() routine

Some watchdog may need to check if watchdog is ACTIVE or not, for example in
their suspend/resume hooks.

This patch adds this routine and changes the core drivers to use it.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 09a46e73 20-Apr-2012 H Hartley Sweeten <hartleys@visionengravers.com>

watchdog: watchdog_dev: include private header to pickup global symbol prototypes

Include the private watchdog_dev.h header to pickup the prototypes for the
watchdog_dev_register/unregister function

watchdog: watchdog_dev: include private header to pickup global symbol prototypes

Include the private watchdog_dev.h header to pickup the prototypes for the
watchdog_dev_register/unregister functions.

This quiets the following sparse warnings:

warning: symbol 'watchdog_dev_register' was not declared. Should it be static?
warning: symbol 'watchdog_dev_unregister' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# fd7b673c 16-Mar-2012 Viresh Kumar <viresh.kumar@st.com>

watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core

This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there
is another function pointer added to struct watchdo

watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core

This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there
is another function pointer added to struct watchdog_ops, which can be passed by
drivers to support this IOCTL.

Related documentation is updated too.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


Revision tags: v3.3-rc7, v3.3-rc6, v3.3-rc5, v3.3-rc4, v3.3-rc3, v3.3-rc2, v3.3-rc1, v3.2, v3.2-rc7, v3.2-rc6, v3.2-rc5, v3.2-rc4, v3.2-rc3, v3.2-rc2, v3.2-rc1, v3.1, v3.1-rc10, v3.1-rc9, v3.1-rc8, v3.1-rc7, v3.1-rc6
# b10f7c12 12-Sep-2011 Hans de Goede <hdegoede@redhat.com>

watchdog: watchdog_dev: Let the driver update the timeout field on set_timeout success

When a set_timeout operation succeeds this does not necessarily mean that
the exact timeout requested has been

watchdog: watchdog_dev: Let the driver update the timeout field on set_timeout success

When a set_timeout operation succeeds this does not necessarily mean that
the exact timeout requested has been achieved, because the watchdog does not
necessarily have a 1 second resolution. So rather then have the core set
the timeout member of the watchdog_device struct to the exact requested
value, instead the driver should set it to the actually achieved timeout value.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 27c766aa 15-Feb-2012 Joe Perches <joe@perches.com>

watchdog: Use pr_<fmt> and pr_<level>

Use the current logging styles.

Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
Co

watchdog: Use pr_<fmt> and pr_<level>

Use the current logging styles.

Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
Coalesce formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


Revision tags: v3.1-rc5, v3.1-rc4, v3.1-rc3, v3.1-rc2, v3.1-rc1
# cb7efc02 03-Aug-2011 H Hartley Sweeten <hsweeten@visionengravers.com>

watchdog: WatchDog Timer Driver Core - use passed watchdog_device

Use the passed watchdog_device instead of the static global variable when
testing and setting the status in watchdog_ping, watchdog_

watchdog: WatchDog Timer Driver Core - use passed watchdog_device

Use the passed watchdog_device instead of the static global variable when
testing and setting the status in watchdog_ping, watchdog_start, and
watchdog_stop. Note that the callers of these functions are actually
passing the static global variable.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

show more ...


# 3f43f68e 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add minimum and max timeout

Add min_timeout (minimum timeout) and max_timeout
values so that the framework can check if the new
timeout value is between the mi

watchdog: WatchDog Timer Driver Core - Add minimum and max timeout

Add min_timeout (minimum timeout) and max_timeout
values so that the framework can check if the new
timeout value is between the minimum and maximum
timeout values. If both values are 0, then the
framework will leave the check for the watchdog
device driver itself.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 78d88fc0 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add ioctl call

Add support for extra ioctl calls by adding a
ioctl watchdog operation. This operation will be
called before we do our own handling of ioctl
com

watchdog: WatchDog Timer Driver Core - Add ioctl call

Add support for extra ioctl calls by adding a
ioctl watchdog operation. This operation will be
called before we do our own handling of ioctl
commands. This way we can override the internal
ioctl command handling and we can also add
extra ioctl commands. The ioctl watchdog operation
should return the appropriate error codes or
-ENOIOCTLCMD if the ioctl command should be handled
through the internal ioctl handling of the framework.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 7e192b9c 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add nowayout feature

Add support for the nowayout feature to the
WatchDog Timer Driver Core framework.
This feature prevents the watchdog timer from being
stop

watchdog: WatchDog Timer Driver Core - Add nowayout feature

Add support for the nowayout feature to the
WatchDog Timer Driver Core framework.
This feature prevents the watchdog timer from being
stopped.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 017cf080 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add Magic Close feature

Add support for the Magic Close feature to the
WatchDog Timer Driver Core framework.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk

watchdog: WatchDog Timer Driver Core - Add Magic Close feature

Add support for the Magic Close feature to the
WatchDog Timer Driver Core framework.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 014d694e 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl

This part add's the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl
functionality to the WatchDog Timer Driver Core

watchdog: WatchDog Timer Driver Core - Add WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl

This part add's the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl
functionality to the WatchDog Timer Driver Core framework.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 234445b4 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add WDIOC_SETOPTIONS ioctl

This part add's the WDIOC_SETOPTIONS ioctl functionality
to the WatchDog Timer Driver Core framework.

Signed-off-by: Alan Cox <alan

watchdog: WatchDog Timer Driver Core - Add WDIOC_SETOPTIONS ioctl

This part add's the WDIOC_SETOPTIONS ioctl functionality
to the WatchDog Timer Driver Core framework.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# c2dc00e4 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl

This part add's the WDIOC_KEEPALIVE ioctl functionality to the
WatchDog Timer Driver Core framework. Please note that the
WDIOF_KEEPA

watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl

This part add's the WDIOC_KEEPALIVE ioctl functionality to the
WatchDog Timer Driver Core framework. Please note that the
WDIOF_KEEPALIVEPING bit has to be set in the watchdog_info
options field.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 2fa03560 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add basic ioctl functionality

This part add's the basic ioctl functionality to the
WatchDog Timer Driver Core framework. The supported
ioctl call's are:
WDIOC

watchdog: WatchDog Timer Driver Core - Add basic ioctl functionality

This part add's the basic ioctl functionality to the
WatchDog Timer Driver Core framework. The supported
ioctl call's are:
WDIOC_GETSUPPORT
WDIOC_GETSTATUS
WDIOC_GETBOOTSTATUS

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


# 43316044 22-Jul-2011 Wim Van Sebroeck <wim@iguana.be>

watchdog: WatchDog Timer Driver Core - Add basic framework

The WatchDog Timer Driver Core is a framework
that contains the common code for all watchdog-driver's.
It also introduces a watchdog device

watchdog: WatchDog Timer Driver Core - Add basic framework

The WatchDog Timer Driver Core is a framework
that contains the common code for all watchdog-driver's.
It also introduces a watchdog device structure and the
operations that go with it.

This is the introduction of this framework. This part
supports the minimal watchdog userspace API (or with
other words: the functionality to use /dev/watchdog's
open, release and write functionality as defined in
the simplest watchdog API). Extra functionality will
follow in the next set of patches.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

show more ...


Revision tags: v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5
# 2c904630 27-Aug-2020 Zhen Lei <thunder.leizhen@huawei.com>

watchdog: remove unneeded inclusion of <uapi/linux/sched/types.h>

There has been no reference to "struct sched_param" since
commit 94beddacb53c ("sched,watchdog: Convert to sched_set_fif

watchdog: remove unneeded inclusion of <uapi/linux/sched/types.h>

There has been no reference to "struct sched_param" since
commit 94beddacb53c ("sched,watchdog: Convert to sched_set_fifo()"), so
there's no need to include <uapi/linux/sched/types.h> any more, delete
it.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200827062154.1847-1-thunder.leizhen@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

show more ...


Revision tags: v5.8.4, v5.4.61
# 937425d4 23-Aug-2020 Dinghao Liu <dinghao.liu@zju.edu.cn>

watchdog: Use put_device on error

We should use put_device() instead of freeing device
directly after device_initialize().

Fixes: cb36e29bb0e4b ("watchdog: initialize device bef

watchdog: Use put_device on error

We should use put_device() instead of freeing device
directly after device_initialize().

Fixes: cb36e29bb0e4b ("watchdog: initialize device before misc_register")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200824031230.31050-1-dinghao.liu@zju.edu.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

show more ...


# 5afb6d20 23-Aug-2020 Dinghao Liu <dinghao.liu@zju.edu.cn>

watchdog: Fix memleak in watchdog_cdev_register

When watchdog_kworker is NULL, we should free wd_data
before the function returns to prevent memleak.

Fixes: 664a39236e718 ("watc

watchdog: Fix memleak in watchdog_cdev_register

When watchdog_kworker is NULL, we should free wd_data
before the function returns to prevent memleak.

Fixes: 664a39236e718 ("watchdog: Introduce hardware maximum heartbeat in watchdog core")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200824024001.25474-1-dinghao.liu@zju.edu.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

show more ...


12345678