Skip to content

Commit

Permalink
Merge tag 'linux-watchdog-4.20-rc1' of git://www.linux-watchdog.org/l…
Browse files Browse the repository at this point in the history
…inux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

 - Add Armada 37xx CPU watchdog

 - w83627hf_wdt: Add Support for NCT6796D, NCT6797D, NCT6798D

 - hpwdt: several improvements

 - renesas_wdt: SPDX identifiers, stop when unregistering, support for
   R7S9210

 - rza_wdt: SPDX identifiers, support longer timeouts

 - core: fix null pointer dereference when releasing cdev

 - iTCO_wdt: Drop option vendorsupport=2

 - sama5d4: fix timeout-sec usage

 - lantiq_wdt: convert to watchdog framework

 - several small fixes

* tag 'linux-watchdog-4.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits)
  watchdog: ts4800: release syscon device node in ts4800_wdt_probe()
  watchdog: armada_37xx_wdt: use do_div for u64 division
  documentation: watchdog: add documentation for armada-37xx-wdt
  dt-bindings: watchdog: Document armada-37xx-wdt binding
  watchdog: Add support for Armada 37xx CPU watchdog
  dt-bindings: watchdog: add mpc8xxx-wdt support
  watchdog: mpc8xxx: provide boot status
  MAINTAINERS: Fix file pattern for MEN Z069 watchdog driver
  dt-bindings: watchdog: renesas-wdt: Add support for R7S9210
  watchdog: rza_wdt: Support longer timeouts
  watchdog: hpwdt: Disable PreTimeout when Timeout is smaller
  watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D
  watchdog: mpc8xxx: use dev_xxxx() instead of pr_xxxx()
  watchdog: lantiq: add get_timeleft callback
  watchdog: lantiq: Convert to watchdog_device
  watchdog: lantiq: update register names to better match spec
  watchdog: sama5d4: fix timeout-sec usage
  watchdog: fix a small number of "watchog" typos in comments
  watchdog: rza_wdt: convert to SPDX identifiers
  watchdog: iTCO_wdt: Remove unused hooks
  ...
  • Loading branch information
Linus Torvalds committed Oct 27, 2018
2 parents ed3f4e2 + cd6ba41 commit 5ecf3e1
Show file tree
Hide file tree
Showing 23 changed files with 783 additions and 454 deletions.
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
* Armada 37xx CPU Watchdog Timer Controller

Required properties:
- compatible : must be "marvell,armada-3700-wdt"
- reg : base physical address of the controller and length of memory mapped
region.
- clocks : the clock feeding the watchdog timer. See clock-bindings.txt
- marvell,system-controller : reference to syscon node for the CPU Miscellaneous
Registers

Example:

cpu_misc: system-controller@d000 {
compatible = "marvell,armada-3700-cpu-misc", "syscon";
reg = <0xd000 0x1000>;
};

wdt: watchdog@8300 {
compatible = "marvell,armada-3700-wdt";
reg = <0x8300 0x40>;
marvell,system-controller = <&cpu_misc>;
clocks = <&xtalclk>;
};
25 changes: 25 additions & 0 deletions Documentation/devicetree/bindings/watchdog/mpc8xxx-wdt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
* Freescale mpc8xxx watchdog driver (For 83xx, 86xx and 8xx)

Required properties:
- compatible: Shall contain one of the following:
"mpc83xx_wdt" for an mpc83xx
"fsl,mpc8610-wdt" for an mpc86xx
"fsl,mpc823-wdt" for an mpc8xx
- reg: base physical address and length of the area hosting the
watchdog registers.
On the 83xx, "Watchdog Timer Registers" area: <0x200 0x100>
On the 86xx, "Watchdog Timer Registers" area: <0xe4000 0x100>
On the 8xx, "General System Interface Unit" area: <0x0 0x10>

Optional properties:
- reg: additional physical address and length (4) of location of the
Reset Status Register (called RSTRSCR on the mpc86xx)
On the 83xx, it is located at offset 0x910
On the 86xx, it is located at offset 0xe0094
On the 8xx, it is located at offset 0x288

Example:
WDT: watchdog@0 {
compatible = "fsl,mpc823-wdt";
reg = <0x0 0x10 0x288 0x4>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Required properties:
- "renesas,r8a77990-wdt" (R-Car E3)
- "renesas,r8a77995-wdt" (R-Car D3)
- "renesas,r7s72100-wdt" (RZ/A1)
- "renesas,r7s9210-wdt" (RZ/A2)
The generic compatible string must be:
- "renesas,rza-wdt" for RZ/A
- "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G1
Expand Down
93 changes: 31 additions & 62 deletions Documentation/watchdog/hpwdt.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
Last reviewed: 05/20/2016
Last reviewed: 08/20/2018

HPE iLO NMI Watchdog Driver
NMI sourcing for iLO based ProLiant Servers
Documentation and Driver by
Thomas Mingarelli
for iLO based ProLiant Servers

The HPE iLO NMI Watchdog driver is a kernel module that provides basic
watchdog functionality and the added benefit of NMI sourcing. Both the
watchdog functionality and the NMI sourcing capability need to be enabled
by the user. Remember that the two modes are not dependent on one another.
A user can have the NMI sourcing without the watchdog timer and vice-versa.
watchdog functionality and handler for the iLO "Generate NMI to System"
virtual button.

All references to iLO in this document imply it also works on iLO2 and all
subsequent generations.

Expand All @@ -21,12 +18,16 @@ Last reviewed: 05/20/2016
not be updated in a timely fashion and a hardware system reset (also known as
an Automatic Server Recovery (ASR)) event will occur.

The hpwdt driver also has three (3) module parameters. They are the following:
The hpwdt driver also has the following module parameters:

soft_margin - allows the user to set the watchdog timer value.
Default value is 30 seconds.
allow_kdump - allows the user to save off a kernel dump image after an NMI.
Default value is 1/ON
timeout - an alias of soft_margin.
pretimeout - allows the user to set the watchdog pretimeout value.
This is the number of seconds before timeout when an
NMI is delivered to the system. Setting the value to
zero disables the pretimeout NMI.
Default value is 9 seconds.
nowayout - basic watchdog parameter that does not allow the timer to
be restarted or an impending ASR to be escaped.
Default value is set when compiling the kernel. If it is set
Expand All @@ -37,61 +38,29 @@ Last reviewed: 05/20/2016
interface to /dev/watchdog can be found in
Documentation/watchdog/watchdog-api.txt and Documentation/IPMI.txt.

The NMI sourcing capability is disabled by default due to the inability to
distinguish between "NMI Watchdog Ticks" and "HW generated NMI events" in the
Linux kernel. What this means is that the hpwdt nmi handler code is called
each time the NMI signal fires off. This could amount to several thousands of
NMIs in a matter of seconds. If a user sees the Linux kernel's "dazed and
confused" message in the logs or if the system gets into a hung state, then
the hpwdt driver can be reloaded.

1. If the kernel has not been booted with nmi_watchdog turned off then
edit and place the nmi_watchdog=0 at the end of the currently booting
kernel line. Depending on your Linux distribution and platform setup:
For non-UEFI systems
/boot/grub/grub.conf or
/boot/grub/menu.lst
For UEFI systems
/boot/efi/EFI/distroname/grub.conf or
/boot/efi/efi/distroname/elilo.conf
2. reboot the sever
3. Once the system comes up perform a modprobe -r hpwdt
4. modprobe /lib/modules/`uname -r`/kernel/drivers/watchdog/hpwdt.ko

Now, the hpwdt can successfully receive and source the NMI and provide a log
message that details the reason for the NMI (as determined by the HPE BIOS).

Below is a list of NMIs the HPE BIOS understands along with the associated
code (reason):

No source found 00h

Uncorrectable Memory Error 01h

ASR NMI 1Bh

PCI Parity Error 20h

NMI Button Press 27h

SB_BUS_NMI 28h

ILO Doorbell NMI 29h

ILO IOP NMI 2Ah

ILO Watchdog NMI 2Bh

Proc Throt NMI 2Ch
Due to limitations in the iLO hardware, the NMI pretimeout if enabled,
can only be set to 9 seconds. Attempts to set pretimeout to other
non-zero values will be rounded, possibly to zero. Users should verify
the pretimeout value after attempting to set pretimeout or timeout.

Front Side Bus NMI 2Dh
Upon receipt of an NMI from the iLO, the hpwdt driver will initiate a
panic. This is to allow for a crash dump to be collected. It is incumbent
upon the user to have properly configured the system for kdump.

PCI Express Error 2Fh
The default Linux kernel behavior upon panic is to print a kernel tombstone
and loop forever. This is generally not what a watchdog user wants.

DMA controller NMI 30h
For those wishing to learn more please see:
Documentation/kdump/kdump.txt
Documentation/admin-guide/kernel-parameters.txt (panic=)
Your Linux Distribution specific documentation.

Hypertransport/CSI Error 31h
If the hpwdt does not receive the NMI associated with an expiring timer,
the iLO will proceed to reset the system at timeout if the timer hasn't
been updated.

--

The HPE iLO NMI Watchdog Driver and documentation were originally developed
by Tom Mingarelli.

-- Tom Mingarelli
5 changes: 5 additions & 0 deletions Documentation/watchdog/watchdog-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ margin: Watchdog margin in seconds (default=60)
nowayout: Disable watchdog shutdown on close
(default=kernel config parameter)
-------------------------------------------------
armada_37xx_wdt:
timeout: Watchdog timeout in seconds. (default=120)
nowayout: Disable watchdog shutdown on close
(default=kernel config parameter)
-------------------------------------------------
at91rm9200_wdt:
wdt_time: Watchdog time in seconds. (default=5)
nowayout: Watchdog cannot be stopped once started
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9568,7 +9568,7 @@ MEN Z069 WATCHDOG DRIVER
M: Johannes Thumshirn <jth@kernel.org>
L: linux-watchdog@vger.kernel.org
S: Maintained
F: drivers/watchdog/menz069_wdt.c
F: drivers/watchdog/menz69_wdt.c

MESON AO CEC DRIVER FOR AMLOGIC SOCS
M: Neil Armstrong <narmstrong@baylibre.com>
Expand Down
12 changes: 12 additions & 0 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,17 @@ config ARM_SBSA_WATCHDOG
To compile this driver as module, choose M here: The module
will be called sbsa_gwdt.

config ARMADA_37XX_WATCHDOG
tristate "Armada 37xx watchdog"
depends on ARCH_MVEBU || COMPILE_TEST
select MFD_SYSCON
select WATCHDOG_CORE
help
Say Y here to include support for the watchdog timer found on
Marvell Armada 37xx SoCs.
To compile this driver as a module, choose M here: the
module will be called armada_37xx_wdt.

config ASM9260_WATCHDOG
tristate "Alphascale ASM9260 watchdog"
depends on MACH_ASM9260 || COMPILE_TEST
Expand Down Expand Up @@ -1621,6 +1632,7 @@ config IMGPDC_WDT
config LANTIQ_WDT
tristate "Lantiq SoC watchdog"
depends on LANTIQ
select WATCHDOG_CORE
help
Hardware driver for the Lantiq SoC Watchdog Timer.

Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o
# ARM Architecture
obj-$(CONFIG_ARM_SP805_WATCHDOG) += sp805_wdt.o
obj-$(CONFIG_ARM_SBSA_WATCHDOG) += sbsa_gwdt.o
obj-$(CONFIG_ARMADA_37XX_WATCHDOG) += armada_37xx_wdt.o
obj-$(CONFIG_ASM9260_WATCHDOG) += asm9260_wdt.o
obj-$(CONFIG_AT91RM9200_WATCHDOG) += at91rm9200_wdt.o
obj-$(CONFIG_AT91SAM9X_WATCHDOG) += at91sam9_wdt.o
Expand Down
Loading

0 comments on commit 5ecf3e1

Please sign in to comment.