26 Mar, 2018

1 commit


03 Feb, 2018

3 commits


20 Oct, 2017

1 commit


09 Sep, 2017

1 commit


03 Jul, 2017

1 commit


19 May, 2017

1 commit

  • The ICH9 is listed as having TCO v2, and indeed the behavior in the
    datasheet corresponds to v2 (for example the NO_REBOOT flag is
    accessible via the 16KiB-aligned Root Complex Base Address).

    However, the TCO counts twice just like in v1; the documentation
    of the SECOND_TO_STS bit says: "ICH9 sets this bit to 1 to indicate
    that the TIMEOUT bit had been (or is currently) set and a second
    timeout occurred before the TCO_RLD register was written. If this
    bit is set and the NO_REBOOT config bit is 0, then the ICH9 will
    reboot the system after the second timeout. The same can be found
    in the BayTrail (Atom E3800) datasheet, and even HOWTOs around
    the Internet say that it will reboot after _twice_ the specified
    heartbeat.

    I did not find the Apollo Lake datasheet, but because v4/v5 has
    a SECOND_TO_STS bit just like the previous version I'm enabling
    this for Apollo Lake as well.

    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Paolo Bonzini
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Paolo Bonzini
     

25 Feb, 2017

2 commits


24 Oct, 2016

1 commit


15 Oct, 2016

1 commit

  • …/kernel/git/shuah/linux-kselftest

    Pull kselftest updates from Shuah Khan:
    "This update consists of:

    - Fixes and improvements to existing tests

    - Moving code from Documentation to selftests, samples, and tools:

    * Moves dnotify_test, prctl, ptp, vDSO, ia64, watchdog, and
    networking tests from Documentation to selftests.

    * Moves mic/mpssd, misc-devices/mei, timers, watchdog, auxdisplay,
    and blackfin examples from Documentation to samples.

    * Moves accounting, laptops/dslm, and pcmcia/crc32hash tools from
    Documentation to tools.

    * Deletes BUILD_DOCSRC and its dependencies"

    * tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
    selftests/futex: Check ANSI terminal color support
    Doc: update 00-INDEX files to reflect the runnable code move
    samples: move blackfin gptimers-example from Documentation
    tools: move pcmcia crc32hash tool from Documentation
    tools: move laptops dslm tool from Documentation
    tools: move accounting tool from Documentation
    samples: move auxdisplay example code from Documentation
    samples: move watchdog example code from Documentation
    samples: move timers example code from Documentation
    samples: move misc-devices/mei example code from Documentation
    samples: move mic/mpssd example code from Documentation
    selftests: Move networking/timestamping from Documentation
    selftests: move watchdog tests from Documentation/watchdog
    selftests: move ia64 tests from Documentation/ia64
    selftests: move vDSO tests from Documentation/vDSO
    selftests: move ptp tests from Documentation/ptp
    selftests: move prctl tests from Documentation/prctl
    selftests: move dnotify_test from Documentation/filesystems
    selftests/timers: Add missing error code assignment before test
    selftests/zram: replace ZRAM_LZ4_COMPRESS
    ...

    Linus Torvalds
     

08 Oct, 2016

1 commit

  • The change adds a simple watchdog pretimeout framework infrastructure,
    its purpose is to allow users to select a desired handling of watchdog
    pretimeout events, which may be generated by some watchdog devices.

    A user selects a default watchdog pretimeout governor during
    compilation stage.

    Watchdogs with WDIOF_PRETIMEOUT capability now have one more device
    attribute in sysfs, pretimeout_governor attribute is intended to display
    the selected watchdog pretimeout governor.

    The framework has no impact at runtime on watchdog devices with no
    WDIOF_PRETIMEOUT capability set.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     

24 Sep, 2016

2 commits

  • Since the watchdog framework centrializes the IOCTL interfaces of device
    drivers now, SETPRETIMEOUT and GETPRETIMEOUT need to be added in the
    common code.

    Signed-off-by: Robin Gong
    Signed-off-by: Wolfram Sang
    [vzapolskiy: added conditional pretimeout sysfs attribute visibility]
    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     
  • Move watchdog examples to samples and remove it from Documentation
    Makefile. Create a new Makefile to build watchdog. It can be built
    from top level directory or from watchdog directory:

    Run make -C samples/watchdog or cd samples/watchdog; make

    Acked-by: Jonathan Corbet
    Signed-off-by: Shuah Khan

    Shuah Khan
     

20 Sep, 2016

1 commit


25 Jul, 2016

1 commit

  • A recent commit added a write to the watchdog test code for doing the "magic
    close", but that caused a compile-time warning:

    Documentation/watchdog/src/watchdog-test.c: In function ‘main’:
    Documentation/watchdog/src/watchdog-test.c:94:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]

    This changes the code to print a runtime warning if the write fails.

    Fixes: 5a2d3de19602 ("Documentation/watchdog: add support for magic close to watchdog-test")
    Signed-off-by: Arnd Bergmann
    Acked-by: Timur Tabi
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Arnd Bergmann
     

19 Jul, 2016

1 commit

  • Up to now, the watchdog status function called a driver function,
    which was supposed to return the watchdog status. All but one
    driver using the watchdog core did not implement this function,
    and the driver implementing it did not implement it correctly
    (the function is supposed to return WDIOF_ flags). At the same time,
    at least some of the status information can be provided by the watchdog
    core.

    Provide the available status bits directly from the watchdog driver core.
    Call the driver status function if it exists to get the boot status, but
    always provide WDIOF_MAGICCLOSE and WDIOF_KEEPALIVEPING internally.
    This patch makes the 'status' sysfs attribute always available.
    This attribute is now displayed as hex number with 0x prepended to be
    easier to decode.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

18 Jul, 2016

4 commits


15 May, 2016

1 commit


14 May, 2016

1 commit


20 Mar, 2016

1 commit

  • Pull watchdog updates from Wim Van Sebroeck:

    - new drivers for: NI 903x/913x watchdog driver, WinSystems EBC-C384
    watchdog timer and ARM SBSA watchdog driver

    - Support for NCT6102D devices

    - Improvements of the generic watchdog framework (improve restart
    handler, make set_timeout optional, introduce infrastructure
    triggered keepalives, ...

    - improvements on the pnx4008 watchdog driver

    - several smaller fixes and improvements

    * git://www.linux-watchdog.org/linux-watchdog: (28 commits)
    watchdog: Ensure that wdd is not dereferenced if NULL
    watchdog: imx2: Convert to use infrastructure triggered keepalives
    watchdog: dw_wdt: Convert to use watchdog infrastructure
    watchdog: Add support for minimum time between heartbeats
    watchdog: Make stop function optional
    watchdog: Introduce WDOG_HW_RUNNING flag
    watchdog: Introduce hardware maximum heartbeat in watchdog core
    watchdog: Make set_timeout function optional
    arm: lpc32xx: remove restart handler
    arm: lpc32xx: phy3250 remove restart hook
    watchdog: pnx4008: restart: support "cmd" from userspace
    watchdog: pnx4008: add support for soft reset
    watchdog: pnx4008: add restart handler
    watchdog: pnx4008: update logging during power-on
    watchdog: tangox_wdt: test clock rate to avoid division by 0
    watchdog: atlas7_wdt: test clock rate to avoid division by 0
    watchdog: s3c2410_wdt: Add max and min timeout values
    Watchdog: introduce ARM SBSA watchdog driver
    Documentation: add sbsa-gwdt driver documentation
    watchdog: Add watchdog timer support for the WinSystems EBC-C384
    ...

    Linus Torvalds
     

17 Mar, 2016

5 commits

  • Some watchdogs require a minimum time between heartbeats.
    Examples are the watchdogs in DA9062 and AT91SAM9x.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     
  • Not all hardware watchdogs can be stopped. The driver for
    such watchdogs would typically only set the WATCHDOG_HW_RUNNING
    flag in its stop function. Make the stop function optional and set
    WATCHDOG_HW_RUNNING in the watchdog core if it is not provided.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    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: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    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: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     
  • For some watchdogs, the watchdog driver handles timeout changes without
    explicitly setting any registers. In this situation, the watchdog driver
    might only set the 'timeout' variable but do nothing else.
    This can as well be handled by the infrastructure, so make the set_timeout
    callback optional. If WDIOF_SETTIMEOUT is configured but the .set_timeout
    callback is not available, update the timeout variable in the
    infrastructure code.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

05 Mar, 2016

1 commit

  • The sbsa-gwdt.txt documentation in devicetree/bindings/watchdog is for
    introducing SBSA(Server Base System Architecture) Generic Watchdog
    device node info into FDT.

    Also add sbsa-gwdt introduction in watchdog-parameters.txt

    Acked-by: Arnd Bergmann
    Acked-by: Rob Herring
    Signed-off-by: Fu Wei
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Fu Wei
     

01 Mar, 2016

1 commit


01 Feb, 2016

1 commit

  • This driver adds sparc hypervisor watchdog support. The default
    timeout is 60 seconds and the range is between 1 and
    31536000 seconds. Both watchdog-resolution and
    watchdog-max-timeout MD properties settings are supported.

    Signed-off-by: Wim Coekaerts
    Reviewed-by: Julian Calaby
    Reviewed-by: Guenter Roeck
    Signed-off-by: David S. Miller

    wim.coekaerts@oracle.com
     

12 Jan, 2016

2 commits

  • 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: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    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: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

30 Dec, 2015

1 commit

  • 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: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

13 Dec, 2015

2 commits

  • 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: Vivien Didelot
    Signed-off-by: Damien Riegel
    Reviewed-by: Vivien Didelot
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    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: Vivien Didelot
    Signed-off-by: Damien Riegel
    Reviewed-by: Guenter Roeck
    Reviewed-by: Vivien Didelot
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Damien Riegel
     

10 Sep, 2015

1 commit


01 Jul, 2015

1 commit

  • Add a early_enable module parameter to the omap_wdt that starts the
    watchdog on module insertion. The default value is 0 which does not
    start the watchdog - which also does not change the behavior if the
    parameter is not given.

    Signed-off-by: Lars Poeschel
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Lars Poeschel