linux-stable/drivers/watchdog
Mika Westerberg 566267aeeb watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
commit ef9b7bf52c upstream.

Daniel reported that the commit 1ae3e78c08 ("watchdog: iTCO_wdt: No
need to stop the timer in probe") makes QEMU implementation of the iTCO
watchdog not to trigger reboot anymore when NO_REBOOT flag is initially
cleared using this option (in QEMU command line):

  -global ICH9-LPC.noreboot=false

The problem with the commit is that it left the unconditional setting of
NO_REBOOT that is not cleared anymore when the kernel keeps pinging the
watchdog (as opposed to the previous code that called iTCO_wdt_stop()
that cleared it).

Fix this so that we only set NO_REBOOT if the watchdog was not initially
running.

Fixes: 1ae3e78c08 ("watchdog: iTCO_wdt: No need to stop the timer in probe")
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221028062750.45451-1-mika.westerberg@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:43:39 +02:00
..
acquirewdt.c
advantechwdt.c
alim1535_wdt.c
alim7101_wdt.c
ar7_wdt.c
asm9260_wdt.c watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe() 2018-05-30 07:52:36 +02:00
aspeed_wdt.c watchdog: aspeed: fix hardware timeout calculation 2021-07-20 16:17:53 +02:00
at32ap700x_wdt.c
at91rm9200_wdt.c
at91sam9_wdt.c watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path 2023-03-11 16:26:52 +01:00
at91sam9_wdt.h
ath79_wdt.c mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
atlas7_wdt.c watchdog: constify watchdog_ops structures 2017-02-24 14:00:23 -08:00
bcm47xx_wdt.c watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops 2017-07-03 13:53:28 +02:00
bcm63xx_wdt.c
bcm2835_wdt.c watchdog: bcm2835_wdt: Fix module autoload 2019-09-06 10:20:47 +02:00
bcm7038_wdt.c watchdog: bcm7038: Check the return value from clk_prepare_enable() 2017-09-09 20:52:13 +02:00
bcm_kona_wdt.c watchdog: bcm281xx: Fix use of uninitialized spinlock. 2017-05-19 10:42:25 +02:00
bfin_wdt.c
booke_wdt.c watchdog: constify watchdog_ops structures 2017-02-24 14:00:23 -08:00
cadence_wdt.c watchdog: cadence_wdt: Show information when driver is probed 2017-09-09 20:35:31 +02:00
coh901327_wdt.c watchdog: coh901327_wdt: constify watchdog_ops structure 2017-09-09 20:06:38 +02:00
cpu5wdt.c Annotate hardware config module parameters in drivers/watchdog/ 2017-04-20 12:02:32 +01:00
cpwd.c watchdog: cpwd: remove memory allocate failure message 2016-12-16 06:53:55 -08:00
da9052_wdt.c watchdog: da9052_wdt: Convert to use device managed functions 2017-02-24 14:00:23 -08:00
da9055_wdt.c watchdog: da9055_wdt: Convert to use device managed functions 2017-02-24 14:00:23 -08:00
da9062_wdt.c watchdog: da9062: No need to ping manually before setting timeout 2020-06-25 15:41:54 +02:00
da9063_wdt.c watchdog: da9063: Fix updating timeout value 2018-08-03 07:50:24 +02:00
davinci_wdt.c watchdog: davinci_wdt: fix error handling in davinci_wdt_probe() 2018-05-30 07:52:29 +02:00
diag288_wdt.c watchdog: diag288_wdt: fix __diag288() inline assembly 2023-02-22 12:46:02 +01:00
digicolor_wdt.c watchdog: constify watchdog_ops structures 2017-02-24 14:00:23 -08:00
dw_wdt.c watchdog: dw: RMW the control register 2018-05-30 07:52:32 +02:00
ebc-c384_wdt.c watchdog: ebc-c384_wdt: Utilize devm_ functions in driver probe callback 2017-02-24 14:00:23 -08:00
ep93xx_wdt.c watchdog: ep93xx_wdt: cleanup and let the core handle the heartbeat 2017-02-24 14:00:23 -08:00
eurotechwdt.c Annotate hardware config module parameters in drivers/watchdog/ 2017-04-20 12:02:32 +01:00
f71808e_wdt.c watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT 2021-11-26 11:40:35 +01:00
gef_wdt.c
gemini_wdt.c watchdog: add driver for Cortina Gemini watchdog 2017-02-24 14:00:23 -08:00
geodewdt.c
gpio_wdt.c watchdog: gpio_wdt: set WDOG_HW_RUNNING in gpio_wdt_stop 2018-02-16 20:22:44 +01:00
hpwdt.c watchdog: hpwdt: Remove legacy NMI sourcing. 2018-03-15 10:54:22 +01:00
i6300esb.c
ib700wdt.c
ibmasr.c
ie6xx_wdt.c
imgpdc_wdt.c watchdog: constify watchdog_info structures 2017-02-24 14:00:23 -08:00
imx2_wdt.c watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout 2019-10-11 18:18:35 +02:00
indydog.c
intel-mid_wdt.c watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load 2023-09-23 10:47:01 +02:00
intel_scu_watchdog.c
intel_scu_watchdog.h
iop_wdt.c
it87_wdt.c watchdog: it87_wdt: constify watchdog_ops structure 2017-09-09 20:06:25 +02:00
it8712f_wdt.c
iTCO_vendor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iTCO_vendor_support.c
iTCO_wdt.c watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running 2023-10-10 21:43:39 +02:00
ixp4xx_wdt.c
jz4740_wdt.c watchdog: jz4740: Fix modular build 2016-12-16 06:53:54 -08:00
Kconfig ar7: fix kernel builds for compiler test 2021-11-26 11:40:35 +01:00
kempld_wdt.c watchdog: kempld: fix gcc-4.3 build 2017-03-01 06:15:10 -08:00
ks8695_wdt.c
lantiq_wdt.c watchdog: lantiq: access boot cause register through regmap 2017-09-04 13:53:15 +02:00
loongson1_wdt.c watchdog: loongson1: Add Loongson1 SoC watchdog driver 2016-12-16 06:53:55 -08:00
lpc18xx_wdt.c watchdog: Fix possible use-after-free by calling del_timer_sync() 2021-07-20 16:17:52 +02:00
m54xx_wdt.c
machzwd.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
max63xx_wdt.c
max77620_wdt.c watchdog: max77620_wdt: constify platform_device_id 2017-09-09 20:40:39 +02:00
mei_wdt.c watchdog: mei_wdt: request stop on unregister 2021-03-03 18:22:54 +01:00
mena21_wdt.c watchdog: mena21_wdt: Convert to use device managed functions and other improvements 2017-02-24 14:00:23 -08:00
menf21bmc_wdt.c
meson_gxbb_wdt.c watchdog: meson: Fix the wrong value of left time 2019-12-05 15:37:03 +01:00
meson_wdt.c watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2 2017-09-09 20:14:01 +02:00
mixcomwd.c
moxart_wdt.c
mpc8xxx_wdt.c watchdog: mpc8xxx: Remove unneeded linux/miscdevice.h include 2016-12-16 06:53:55 -08:00
mt7621_wdt.c watchdog: constify watchdog_ops and watchdog_info structures 2017-09-09 20:29:53 +02:00
mtk_wdt.c
mtx-1_wdt.c
mv64x60_wdt.c
ni903x_wdt.c
nic7018_wdt.c watchdog: nic7018_wdt: Add NIC7018 watchdog driver 2017-02-24 14:00:23 -08:00
nuc900_wdt.c
nv_tco.c watchdog: add support for MCP78S chipset in nv_tco 2016-07-17 21:04:13 +02:00
nv_tco.h
octeon-wdt-main.c watchdog: octeon-wdt: Add support for 78XX SOCs. 2017-09-04 21:19:03 +02:00
octeon-wdt-nmi.S watchdog: octeon-wdt: Remove old boot vector code. 2017-09-04 21:19:03 +02:00
of_xilinx_wdt.c watchdog: of_xilinx_wdt: Add suspend/resume support 2017-09-09 20:48:18 +02:00
omap_wdt.c watchdog: Fix OMAP watchdog early handling 2021-11-26 11:40:22 +01:00
omap_wdt.h
orion_wdt.c watchdog: orion: make license info match the file header 2017-06-05 20:39:12 +02:00
pc87413_wdt.c Annotate hardware config module parameters in drivers/watchdog/ 2017-04-20 12:02:32 +01:00
pcwd.c watchdog: pcwd: Utilize the module_isa_driver macro 2016-07-17 20:59:23 +02:00
pcwd_pci.c
pcwd_usb.c watchdog: pcwd_usb: Fix attempting to access uninitialized memory 2023-03-11 16:26:52 +01:00
pic32-dmt.c watchdog: pic32-dmt: Remove .owner field for driver 2016-07-25 12:02:32 +02:00
pic32-wdt.c watchdog: pic32-wdt: Fix return value check in pic32_wdt_drv_probe() 2016-07-25 12:02:43 +02:00
pika_wdt.c watchdog: pika_wdt: add __ro_after_init to ident 2017-02-24 14:00:23 -08:00
pnx833x_wdt.c
pnx4008_wdt.c
pretimeout_noop.c watchdog: pretimeout: add noop pretimeout governor 2016-10-08 10:27:13 +02:00
pretimeout_panic.c watchdog: pretimeout: add panic pretimeout governor 2016-10-08 10:27:17 +02:00
qcom-wdt.c watchdog: qcom: Avoid context switch in restart handler 2020-12-29 13:47:02 +01:00
rc32434_wdt.c
rdc321x_wdt.c drivers: watchdog: rdc321x_wdt: Fix race condition bugs 2020-11-05 11:06:57 +01:00
renesas_wdt.c watchdog: renesas_wdt: don't set divider while watchdog is running 2019-02-12 19:46:03 +01:00
retu_wdt.c
riowd.c
rn5t618_wdt.c watchdog: rn5t618_wdt: fix module aliases 2020-02-05 14:18:06 +00:00
rt2880_wdt.c watchdog: constify watchdog_ops and watchdog_info structures 2017-09-09 20:29:53 +02:00
rza_wdt.c watchdog: add rza_wdt driver 2017-06-05 20:37:17 +02:00
s3c2410_wdt.c watchdog: s3c2410: Minor code cleanup 2017-06-05 20:38:52 +02:00
sa1100_wdt.c watchdog: sa11x0/pxa: fix error path of driver initialization 2017-02-24 14:00:23 -08:00
sama5d4_wdt.c watchdog: sama5d4: fix WDD value to be always set to max 2019-12-05 15:38:19 +01:00
sb_wdog.c
sbc60xxwdt.c watchdog: Fix possible use-after-free in wdt_startup() 2021-07-20 16:17:51 +02:00
sbc7240_wdt.c
sbc8360.c
sbc_epx_c3.c
sbc_fitpc2_wdt.c
sbsa_gwdt.c watchdog: sbsa_wdog: Make sure the timeout programming is within the limits 2023-04-20 12:02:12 +02:00
sc520_wdt.c watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff() 2021-07-20 16:17:52 +02:00
sc1200wdt.c watchdog: sc1200: constify pnp_device_id 2017-09-09 21:14:46 +02:00
sch311x_wdt.c
scx200_wdt.c
shwdt.c
sirfsoc_wdt.c watchdog: constify watchdog_ops structures 2017-02-24 14:00:23 -08:00
smsc37b787_wdt.c
softdog.c watchdog: softdog: fire watchdog even if softirqs do not get to run 2017-03-01 06:15:10 -08:00
sp805_wdt.c watchdog: sp805: constify amba_id 2017-09-09 21:17:44 +02:00
sp5100_tco.c
sp5100_tco.h watchdog: sp5100_tco: Fix watchdog disable bit 2018-04-26 11:02:08 +02:00
st_lpc_wdt.c watchdog: st_wdt: Remove support for obsolete platforms 2016-09-24 08:59:49 +02:00
stm32_iwdg.c watchdog: stm32_iwdg: constify watchdog_ops structure 2017-09-09 20:06:31 +02:00
stmp3xxx_rtc_wdt.c
sun4v_wdt.c watchdog: constify watchdog_ops structures 2017-02-24 14:00:23 -08:00
sunxi_wdt.c watchdog: sunxi_wdt: Convert to use device managed functions and other improvements 2017-02-24 14:00:23 -08:00
tangox_wdt.c watchdog: tangox: Use watchdog core to install restart handler 2017-02-24 14:00:23 -08:00
tegra_wdt.c watchdog: tegra_wdt: Convert to use device managed functions 2017-02-24 14:00:23 -08:00
ts72xx_wdt.c watchdog: ts72xx_wdt: constify watchdog_ops structure 2017-09-09 20:06:14 +02:00
ts4800_wdt.c
twl4030_wdt.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
txx9wdt.c watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF 2016-09-23 22:36:32 +02:00
uniphier_wdt.c watchdog: uniphier: add UniPhier watchdog driver 2017-07-03 13:58:55 +02:00
ux500_wdt.c
via_wdt.c
w83627hf_wdt.c watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D 2019-11-24 08:22:57 +01:00
w83877f_wdt.c watchdog: Fix possible use-after-free by calling del_timer_sync() 2021-07-20 16:17:52 +02:00
w83977f_wdt.c
wafer5823wdt.c
watchdog_core.c watchdog: core: Fix devres_alloc() allocation size 2016-09-23 08:37:14 +02:00
watchdog_core.h
watchdog_dev.c watchdog: Fix kmemleak in watchdog_cdev_register 2023-03-11 16:26:52 +01:00
watchdog_pretimeout.c watchdog: pretimeout: add pretimeout_available_governors attribute 2016-10-08 10:27:24 +02:00
watchdog_pretimeout.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wd501p.h
wdat_wdt.c ACPI: watchdog: Fix gas->access_width usage 2020-03-11 18:02:48 +01:00
wdrtas.c
wdt.c Annotate hardware config module parameters in drivers/watchdog/ 2017-04-20 12:02:32 +01:00
wdt285.c
wdt977.c
wdt_pci.c watchdog: wdt_pci: fix build error if define SOFTWARE_REBOOT 2017-05-18 18:51:44 +02:00
wm831x_wdt.c watchdog: wm831x_wdt: Convert to use device managed functions 2017-02-24 14:00:23 -08:00
wm8350_wdt.c
xen_wdt.c
ziirave_wdt.c watchdog: ziirave: constify i2c_device_id 2017-09-09 21:16:17 +02:00
zx2967_wdt.c watchdog: zx2967: explicitly request exclusive reset control 2017-09-09 20:18:43 +02:00