- 17 3月, 2016 3 次提交
-
-
由 Guenter Roeck 提交于
Some watchdogs require a minimum time between heartbeats. Examples are the watchdogs in DA9062 and AT91SAM9x. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Guenter Roeck 提交于
The WDOG_HW_RUNNING flag is expected to be set by watchdog drivers if the hardware watchdog is running. If the flag is set, the watchdog subsystem will ping the watchdog even if the watchdog device is closed. The watchdog driver stop function is now optional and may be omitted if the watchdog can not be stopped. If stopping the watchdog is not possible but the driver implements a stop function, it is responsible to set the WDOG_HW_RUNNING flag in its stop function. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Guenter Roeck 提交于
Introduce an optional hardware maximum heartbeat in the watchdog core. The hardware maximum heartbeat can be lower than the maximum timeout. Drivers can set the maximum hardware heartbeat value in the watchdog data structure. If the configured timeout exceeds the maximum hardware heartbeat, the watchdog core enables a timer function to assist sending keepalive requests to the watchdog driver. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 01 3月, 2016 1 次提交
-
-
由 Guenter Roeck 提交于
The 'action' (or restart mode) and data parameters may be used by restart handlers, so they should be passed to the restart callback functions. Cc: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 12 1月, 2016 3 次提交
-
-
由 Guenter Roeck 提交于
The lifetime of the watchdog device pointer is different from the lifetime of its character device. Remove it entirely to avoid race conditions. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Guenter Roeck 提交于
The Zodiac watchdog driver attaches additional sysfs attributes to the watchdog device. This has a number of problems: The watchdog device lifetime differs from the driver lifetime, and the device structure should therefore not be accessed from drivers. Also, creating sysfs attributes after driver registration results in a potential race condition if user space expects the attributes to exist but they don't exist yet. Add support for creating driver specific sysfs attributes to the watchdog core to solve the problems. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Tomas Winkler 提交于
ref/unref ops are not called at all so even marked them as deprecated is misleading, we need to just drop the API. Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 30 12月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
All variables required by the watchdog core to manage a watchdog are currently stored in struct watchdog_device. The lifetime of those variables is determined by the watchdog driver. However, the lifetime of variables used by the watchdog core differs from the lifetime of struct watchdog_device. To remedy this situation, watchdog drivers can implement ref and unref callbacks, to be used by the watchdog core to lock struct watchdog_device in memory. While this solves the immediate problem, it depends on watchdog drivers to actually implement the ref/unref callbacks. This is error prone, often not implemented in the first place, or not implemented correctly. To solve the problem without requiring driver support, split the variables in struct watchdog_device into two data structures - one for variables associated with the watchdog driver, one for variables associated with the watchdog core. With this approach, the watchdog core can keep track of its variable lifetime and no longer depends on ref/unref callbacks in the driver. As a side effect, some of the variables originally in struct watchdog_driver are now private to the watchdog core and no longer visible in watchdog drivers. As a side effect of the changes made, an ioctl will now always fail with -ENODEV after a watchdog device was unregistered with the character device still open. Previously, it would only fail with -ENODEV in some situations. Also, ioctl operations are now atomic from driver perspective. With this change, it is now guaranteed that the driver will not unregister a watchdog between a timeout change and the subsequent ping. The 'ref' and 'unref' callbacks in struct watchdog_driver are no longer used and marked as deprecated. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 13 12月, 2015 2 次提交
-
-
由 Damien Riegel 提交于
Many watchdog drivers register a reboot notifier in order to stop the watchdog on system reboot. Thus we can factorize this code in the watchdog core. For that purpose, a new notifier block is added in watchdog_device for internal use only, as well as a new watchdog_stop_on_reboot helper function. If this helper is called, watchdog core registers the related notifier block and will stop the watchdog when SYS_HALT or SYS_DOWN is received. Since this operation can be critical on some platforms, abort the device registration if the reboot notifier registration fails. Suggested-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: NDamien Riegel <damien.riegel@savoirfairelinux.com> Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Damien Riegel 提交于
Many watchdog drivers implement the same code to register a restart handler. This patch provides a generic way to set such a function. The patch adds a new restart watchdog operation. If a restart priority greater than 0 is needed, the driver can call watchdog_set_restart_priority to set it. Suggested-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: NDamien Riegel <damien.riegel@savoirfairelinux.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 04 11月, 2015 2 次提交
-
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 03 11月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
Up to now, a new timeout value is only evaluated against min_timeout if max_timeout is provided. This does not really make sense; a driver can have a minimum timeout even if it does not have a maximum timeout. Ensure that it is not smaller than min_timeout, even if max_timeout is not set. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 05 9月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
The kernel's NMI watchdog has nothing to do with the watchdog subsystem. Its header declarations should be in linux/nmi.h, not linux/watchdog.h. The code provided two sets of dummy functions if HARDLOCKUP_DETECTOR is not configured, one in the include file and one in kernel/watchdog.c. Remove the dummy functions from kernel/watchdog.c and use those from the include file. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Cc: Stephane Eranian <eranian@google.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Don Zickus <dzickus@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 29 6月, 2015 1 次提交
-
-
由 Jean-Baptiste Theou 提交于
Currently, watchdog subsystem require the misc subsystem to register a watchdog. This may not be the case in case of an early registration of a watchdog, which can be required when the watchdog cannot be disabled. This patch introduces a deferral mechanism to remove this requirement. Signed-off-by: NJean-Baptiste Theou <jtheou@adeneo-embedded.us> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 02 4月, 2015 1 次提交
-
-
由 Stephane Eranian 提交于
This patch adds two new functions to enable/disable the watchdog across all CPUs. This will be used by the HT PMU bug workaround code to disable/enable the NMI watchdog across quirk enablement. Signed-off-by: NStephane Eranian <eranian@google.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Cc: bp@alien8.de Cc: jolsa@redhat.com Cc: kan.liang@intel.com Cc: maria.n.dimakopoulou@gmail.com Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/1416251225-17721-12-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
-
- 21 10月, 2014 1 次提交
-
-
由 Uwe Kleine-König 提交于
Signed-off-by: NUwe Kleine-K=C3=B6nig <u.kleine-koenig@pengutronix.de> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 01 3月, 2013 1 次提交
-
-
由 Fabio Porcedda 提交于
Add support for watchdog drivers to initialize/set the timeout field of the watchdog_device structure. The timeout field is initialised either with the module timeout parameter value (if valid) or with the timeout-sec dt property (if valid). If both are invalid the initial value is unchanged. Signed-off-by: NFabio Porcedda <fabio.porcedda@gmail.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 20 12月, 2012 1 次提交
-
-
由 Fabio Porcedda 提交于
Signed-off-by: NFabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 19 11月, 2012 1 次提交
-
-
由 Adam Buchbinder 提交于
"Whether" is misspelled in various comments across the tree; this fixes them. No code changes. Signed-off-by: NAdam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 10月, 2012 1 次提交
-
-
由 David Howells 提交于
Signed-off-by: NDavid Howells <dhowells@redhat.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NMichael Kerrisk <mtk.manpages@gmail.com> Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: NDave Jones <davej@redhat.com>
-
- 30 5月, 2012 6 次提交
-
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Alan Cox 提交于
Create the watchdog class and it's associated devices. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Alan Cox 提交于
Some watchdogs merely trigger external alarms and controls. In a managed environment this is very useful but we want drivers to be able to figure out which is which now multiple dogs can be loaded. Thus add an ALARMONLY feature flag. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Alan Cox 提交于
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: NAlan Cox <alan@linux.intel.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Viresh Kumar 提交于
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: NViresh Kumar <viresh.kumar@st.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 28 3月, 2012 2 次提交
-
-
由 Viresh Kumar 提交于
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: NViresh Kumar <viresh.kumar@st.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
由 Wim Van Sebroeck 提交于
nowayout is actually a boolean value. So make it bool for all watchdog device drivers. Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 06 1月, 2012 1 次提交
-
-
由 Wim Van Sebroeck 提交于
Add two nowayout helpers for the Watchdog Timer Driver Kernel API. And apply this to the already converted drivers. Note: s3c2410_wdt lost the nowayout feature during the conversion. Reviewed-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 28 7月, 2011 8 次提交
-
-
由 Wim Van Sebroeck 提交于
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: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
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: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
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: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
Add support for the Magic Close feature to the WatchDog Timer Driver Core framework. Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
This part add's the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl functionality to the WatchDog Timer Driver Core framework. Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
This part add's the WDIOC_SETOPTIONS ioctl functionality to the WatchDog Timer Driver Core framework. Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
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: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wim Van Sebroeck 提交于
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: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
- 21 6月, 2006 2 次提交
-
-
由 Wim Van Sebroeck 提交于
Some watchdog drivers have the ability to report the remaining time before the system will reboot. With the WDIOC_GETTIMELEFT ioctl you can now read the time left before the watchdog would reboot your system. The following drivers support this new IOCTL: i8xx_tco.c, pcwd_pci.c and pcwd_usb.c . Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Signed-off-by: NAndrew Morton <akpm@osdl.org>
-
由 Corey Minyard 提交于
Some watchdog timers support the concept of a "pretimeout" which occurs some time before the real timeout. The pretimeout can be delivered via an interrupt or NMI and can be used to panic the system when it occurs (so you get useful information instead of a blind reboot). Signed-off-by: NCorey Minyard <minyard@acm.org> Signed-off-by: NWim Van Sebroeck <wim@iguana.be> Signed-off-by: NAndrew Morton <akpm@osdl.org>
-