Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca0bb079 authored by wim.coekaerts@oracle.com's avatar wim.coekaerts@oracle.com Committed by David S. Miller
Browse files

Add sun4v_wdt watchdog driver



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: default avatarWim Coekaerts <wim.coekaerts@oracle.com>
Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a40b953
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -400,3 +400,7 @@ wm8350_wdt:
nowayout: Watchdog cannot be stopped once started
	(default=kernel config parameter)
-------------------------------------------------
sun4v_wdt:
timeout_ms: Watchdog timeout in milliseconds 1..180000, default=60000)
nowayout: Watchdog cannot be stopped once started
-------------------------------------------------
+2 −1
Original line number Diff line number Diff line
@@ -338,8 +338,9 @@ ENTRY(sun4v_mach_set_watchdog)
	mov	%o1, %o4
	mov	HV_FAST_MACH_SET_WATCHDOG, %o5
	ta	HV_FAST_TRAP
	brnz,a,pn %o4, 0f
	stx	%o1, [%o4]
	retl
0:	retl
	 nop
ENDPROC(sun4v_mach_set_watchdog)

+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ EXPORT_SYMBOL(sun4v_niagara_getperf);
EXPORT_SYMBOL(sun4v_niagara_setperf);
EXPORT_SYMBOL(sun4v_niagara2_getperf);
EXPORT_SYMBOL(sun4v_niagara2_setperf);
EXPORT_SYMBOL(sun4v_mach_set_watchdog);

/* from hweight.S */
EXPORT_SYMBOL(__arch_hweight8);
+11 −0
Original line number Diff line number Diff line
@@ -1565,6 +1565,17 @@ config WATCHDOG_RIO
	  machines.  The watchdog timeout period is normally one minute but
	  can be changed with a boot-time parameter.

config WATCHDOG_SUN4V
	tristate "Sun4v Watchdog support"
	select WATCHDOG_CORE
	depends on SPARC64
	help
	  Say Y here to support the hypervisor watchdog capability embedded
	  in the SPARC sun4v architecture.

	  To compile this driver as a module, choose M here. The module will
	  be called sun4v_wdt.

# XTENSA Architecture

# Xen Architecture
+1 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ obj-$(CONFIG_SH_WDT) += shwdt.o

obj-$(CONFIG_WATCHDOG_RIO)		+= riowd.o
obj-$(CONFIG_WATCHDOG_CP1XXX)		+= cpwd.o
obj-$(CONFIG_WATCHDOG_SUN4V)		+= sun4v_wdt.o

# XTENSA Architecture

Loading