Skip to content

Commit a913d94

Browse files
committed
Merge tag 'linux-watchdog-6.10-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - Add Lenovo SE10 platform Watchdog Driver - Other small fixes and improvements * tag 'linux-watchdog-6.10-rc1' of git://www.linux-watchdog.org/linux-watchdog: watchdog: LENOVO_SE10_WDT should depend on X86 && DMI watchdog: sa1100: Fix PTR_ERR_OR_ZERO() vs NULL check in sa1100dog_probe() watchdog: rti_wdt: Set min_hw_heartbeat_ms to accommodate a safety margin watchdog: add HAS_IOPORT dependencies watchdog/wdt-main: Use cpumask_of() to avoid cpumask var on stack watchdog: bd9576: Drop "always-running" property watchdog: mtx-1: drop driver owner assignment watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger watchdog: lenovo_se10_wdt: Watchdog driver for Lenovo SE10 platform
2 parents 0a07e09 + c45b8cf commit a913d94

File tree

9 files changed

+370
-68
lines changed

9 files changed

+370
-68
lines changed

drivers/watchdog/Kconfig

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,17 @@ config GPIO_WATCHDOG_ARCH_INITCALL
254254
arch_initcall.
255255
If in doubt, say N.
256256

257+
config LENOVO_SE10_WDT
258+
tristate "Lenovo SE10 Watchdog"
259+
depends on (X86 && DMI) || COMPILE_TEST
260+
select WATCHDOG_CORE
261+
help
262+
If you say yes here you get support for the watchdog
263+
functionality for the Lenovo SE10 platform.
264+
265+
This driver can also be built as a module. If so, the module
266+
will be called lenovo-se10-wdt.
267+
257268
config MENF21BMC_WATCHDOG
258269
tristate "MEN 14F021P00 BMC Watchdog"
259270
depends on MFD_MENF21BMC || COMPILE_TEST
@@ -482,6 +493,7 @@ config 21285_WATCHDOG
482493
config 977_WATCHDOG
483494
tristate "NetWinder WB83C977 watchdog"
484495
depends on (FOOTBRIDGE && ARCH_NETWINDER) || (ARM && COMPILE_TEST)
496+
depends on HAS_IOPORT
485497
help
486498
Say Y here to include support for the WB977 watchdog included in
487499
NetWinder machines. Alternatively say M to compile the driver as
@@ -1075,7 +1087,7 @@ config ACQUIRE_WDT
10751087

10761088
config ADVANTECH_WDT
10771089
tristate "Advantech SBC Watchdog Timer"
1078-
depends on X86 || COMPILE_TEST
1090+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
10791091
help
10801092
If you are configuring a Linux kernel for the Advantech single-board
10811093
computer, say `Y' here to support its built-in watchdog timer
@@ -1084,7 +1096,7 @@ config ADVANTECH_WDT
10841096

10851097
config ADVANTECH_EC_WDT
10861098
tristate "Advantech Embedded Controller Watchdog Timer"
1087-
depends on X86 || COMPILE_TEST
1099+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
10881100
select ISA_BUS_API
10891101
select WATCHDOG_CORE
10901102
help
@@ -1117,7 +1129,7 @@ config ALIM7101_WDT
11171129

11181130
config EBC_C384_WDT
11191131
tristate "WinSystems EBC-C384 Watchdog Timer"
1120-
depends on X86 || COMPILE_TEST
1132+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
11211133
select ISA_BUS_API
11221134
select WATCHDOG_CORE
11231135
help
@@ -1127,7 +1139,7 @@ config EBC_C384_WDT
11271139

11281140
config EXAR_WDT
11291141
tristate "Exar Watchdog Timer"
1130-
depends on X86 || COMPILE_TEST
1142+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
11311143
select WATCHDOG_CORE
11321144
help
11331145
Enables watchdog timer support for the watchdog timer present
@@ -1138,7 +1150,7 @@ config EXAR_WDT
11381150

11391151
config F71808E_WDT
11401152
tristate "Fintek F718xx, F818xx Super I/O Watchdog"
1141-
depends on X86 || COMPILE_TEST
1153+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
11421154
select WATCHDOG_CORE
11431155
help
11441156
This is the driver for the hardware watchdog on the Fintek F71808E,
@@ -1150,7 +1162,7 @@ config F71808E_WDT
11501162

11511163
config SP5100_TCO
11521164
tristate "AMD/ATI SP5100 TCO Timer/Watchdog"
1153-
depends on (X86 || COMPILE_TEST) && PCI
1165+
depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT
11541166
select WATCHDOG_CORE
11551167
help
11561168
Hardware watchdog driver for the AMD/ATI SP5100 chipset. The TCO
@@ -1189,7 +1201,7 @@ config SC520_WDT
11891201

11901202
config SBC_FITPC2_WATCHDOG
11911203
tristate "Compulab SBC-FITPC2 watchdog"
1192-
depends on X86 || COMPILE_TEST
1204+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
11931205
help
11941206
This is the driver for the built-in watchdog timer on the fit-PC2,
11951207
fit-PC2i, CM-iAM single-board computers made by Compulab.
@@ -1214,15 +1226,15 @@ config SBC_FITPC2_WATCHDOG
12141226

12151227
config EUROTECH_WDT
12161228
tristate "Eurotech CPU-1220/1410 Watchdog Timer"
1217-
depends on X86 || COMPILE_TEST
1229+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
12181230
help
12191231
Enable support for the watchdog timer on the Eurotech CPU-1220 and
12201232
CPU-1410 cards. These are PC/104 SBCs. Spec sheets and product
12211233
information are at <http://www.eurotech.it/>.
12221234

12231235
config IB700_WDT
12241236
tristate "IB700 SBC Watchdog Timer"
1225-
depends on X86 || COMPILE_TEST
1237+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
12261238
help
12271239
This is the driver for the hardware watchdog on the IB700 Single
12281240
Board Computer produced by TMC Technology (www.tmc-uk.com). This
@@ -1239,7 +1251,7 @@ config IB700_WDT
12391251

12401252
config IBMASR
12411253
tristate "IBM Automatic Server Restart"
1242-
depends on X86 || COMPILE_TEST
1254+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
12431255
help
12441256
This is the driver for the IBM Automatic Server Restart watchdog
12451257
timer built-in into some eServer xSeries machines.
@@ -1249,7 +1261,7 @@ config IBMASR
12491261

12501262
config WAFER_WDT
12511263
tristate "ICP Single Board Computer Watchdog Timer"
1252-
depends on X86 || COMPILE_TEST
1264+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
12531265
help
12541266
This is a driver for the hardware watchdog on the ICP Single
12551267
Board Computer. This driver is working on (at least) the following
@@ -1271,7 +1283,7 @@ config I6300ESB_WDT
12711283

12721284
config IE6XX_WDT
12731285
tristate "Intel Atom E6xx Watchdog"
1274-
depends on (X86 || COMPILE_TEST) && PCI
1286+
depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT
12751287
select WATCHDOG_CORE
12761288
select MFD_CORE
12771289
select LPC_SCH
@@ -1301,6 +1313,7 @@ config ITCO_WDT
13011313
select WATCHDOG_CORE
13021314
depends on I2C || I2C=n
13031315
depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
1316+
depends on HAS_IOPORT # for I2C_I801
13041317
select LPC_ICH if !EXPERT
13051318
select I2C_I801 if !EXPERT && I2C
13061319
help
@@ -1331,7 +1344,7 @@ config ITCO_VENDOR_SUPPORT
13311344

13321345
config IT8712F_WDT
13331346
tristate "IT8712F (Smart Guardian) Watchdog Timer"
1334-
depends on X86 || COMPILE_TEST
1347+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
13351348
help
13361349
This is the driver for the built-in watchdog timer on the IT8712F
13371350
Super I/0 chipset used on many motherboards.
@@ -1344,7 +1357,7 @@ config IT8712F_WDT
13441357

13451358
config IT87_WDT
13461359
tristate "IT87 Watchdog Timer"
1347-
depends on X86 || COMPILE_TEST
1360+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
13481361
select WATCHDOG_CORE
13491362
help
13501363
This is the driver for the hardware watchdog on the ITE IT8607,
@@ -1392,7 +1405,7 @@ config KEMPLD_WDT
13921405

13931406
config SC1200_WDT
13941407
tristate "National Semiconductor PC87307/PC97307 (ala SC1200) Watchdog"
1395-
depends on X86 || COMPILE_TEST
1408+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
13961409
help
13971410
This is a driver for National Semiconductor PC87307/PC97307 hardware
13981411
watchdog cards as found on the SC1200. This watchdog is mainly used
@@ -1415,7 +1428,7 @@ config SCx200_WDT
14151428

14161429
config PC87413_WDT
14171430
tristate "NS PC87413 watchdog"
1418-
depends on X86 || COMPILE_TEST
1431+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
14191432
help
14201433
This is the driver for the hardware watchdog on the PC87413 chipset
14211434
This watchdog simply watches your kernel to make sure it doesn't
@@ -1429,7 +1442,7 @@ config PC87413_WDT
14291442

14301443
config NV_TCO
14311444
tristate "nVidia TCO Timer/Watchdog"
1432-
depends on (X86 || COMPILE_TEST) && PCI
1445+
depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT
14331446
help
14341447
Hardware driver for the TCO timer built into the nVidia Hub family
14351448
(such as the MCP51). The TCO (Total Cost of Ownership) timer is a
@@ -1458,7 +1471,7 @@ config RDC321X_WDT
14581471

14591472
config 60XX_WDT
14601473
tristate "SBC-60XX Watchdog Timer"
1461-
depends on X86 || COMPILE_TEST
1474+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
14621475
help
14631476
This driver can be used with the watchdog timer found on some
14641477
single board computers, namely the 6010 PII based computer.
@@ -1498,15 +1511,15 @@ config SBC7240_WDT
14981511

14991512
config CPU5_WDT
15001513
tristate "SMA CPU5 Watchdog"
1501-
depends on X86 || COMPILE_TEST
1514+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
15021515
help
15031516
TBD.
15041517
To compile this driver as a module, choose M here: the
15051518
module will be called cpu5wdt.
15061519

15071520
config SMSC_SCH311X_WDT
15081521
tristate "SMSC SCH311X Watchdog Timer"
1509-
depends on X86 || COMPILE_TEST
1522+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
15101523
help
15111524
This is the driver for the hardware watchdog timer on the
15121525
SMSC SCH3112, SCH3114 and SCH3116 Super IO chipset
@@ -1518,7 +1531,7 @@ config SMSC_SCH311X_WDT
15181531

15191532
config SMSC37B787_WDT
15201533
tristate "Winbond SMsC37B787 Watchdog Timer"
1521-
depends on X86 || COMPILE_TEST
1534+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
15221535
help
15231536
This is the driver for the hardware watchdog component on the
15241537
Winbond SMsC37B787 chipset as used on the NetRunner Mainboard
@@ -1564,7 +1577,7 @@ config VIA_WDT
15641577

15651578
config W83627HF_WDT
15661579
tristate "Watchdog timer for W83627HF/W83627DHG and compatibles"
1567-
depends on X86 || COMPILE_TEST
1580+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
15681581
select WATCHDOG_CORE
15691582
help
15701583
This is the driver for the hardware watchdog on the following
@@ -1594,7 +1607,7 @@ config W83627HF_WDT
15941607

15951608
config W83877F_WDT
15961609
tristate "W83877F (EMACS) Watchdog Timer"
1597-
depends on X86 || COMPILE_TEST
1610+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
15981611
help
15991612
This is the driver for the hardware watchdog on the W83877F chipset
16001613
as used in EMACS PC-104 motherboards (and likely others). This
@@ -1609,7 +1622,7 @@ config W83877F_WDT
16091622

16101623
config W83977F_WDT
16111624
tristate "W83977F (PCM-5335) Watchdog Timer"
1612-
depends on X86 || COMPILE_TEST
1625+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
16131626
help
16141627
This is the driver for the hardware watchdog on the W83977F I/O chip
16151628
as used in AAEON's PCM-5335 SBC (and likely others). This
@@ -1622,7 +1635,7 @@ config W83977F_WDT
16221635

16231636
config MACHZ_WDT
16241637
tristate "ZF MachZ Watchdog"
1625-
depends on X86 || COMPILE_TEST
1638+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
16261639
help
16271640
If you are using a ZF Micro MachZ processor, say Y here, otherwise
16281641
N. This is the driver for the watchdog timer built-in on that
@@ -1635,7 +1648,7 @@ config MACHZ_WDT
16351648

16361649
config SBC_EPX_C3_WATCHDOG
16371650
tristate "Winsystems SBC EPX-C3 watchdog"
1638-
depends on X86 || COMPILE_TEST
1651+
depends on (X86 || COMPILE_TEST) && HAS_IOPORT
16391652
help
16401653
This is the driver for the built-in watchdog timer on the EPX-C3
16411654
Single-board computer made by Winsystems, Inc.
@@ -2197,7 +2210,7 @@ comment "PCI-based Watchdog Cards"
21972210

21982211
config PCIPCWATCHDOG
21992212
tristate "Berkshire Products PCI-PC Watchdog"
2200-
depends on PCI
2213+
depends on PCI && HAS_IOPORT
22012214
help
22022215
This is the driver for the Berkshire Products PCI-PC Watchdog card.
22032216
This card simply watches your kernel to make sure it doesn't freeze,
@@ -2212,7 +2225,7 @@ config PCIPCWATCHDOG
22122225

22132226
config WDTPCI
22142227
tristate "PCI-WDT500/501 Watchdog timer"
2215-
depends on PCI
2228+
depends on PCI && HAS_IOPORT
22162229
help
22172230
If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.
22182231

drivers/watchdog/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
120120
obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
121121
obj-$(CONFIG_IE6XX_WDT) += ie6xx_wdt.o
122122
obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o
123+
obj-$(CONFIG_LENOVO_SE10_WDT) += lenovo_se10_wdt.o
123124
ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y)
124125
obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o
125126
endif

drivers/watchdog/bd9576_wdt.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ struct bd9576_wdt_priv {
2929
struct gpio_desc *gpiod_en;
3030
struct device *dev;
3131
struct regmap *regmap;
32-
bool always_running;
3332
struct watchdog_device wdd;
3433
};
3534

@@ -62,10 +61,7 @@ static int bd9576_wdt_stop(struct watchdog_device *wdd)
6261
{
6362
struct bd9576_wdt_priv *priv = watchdog_get_drvdata(wdd);
6463

65-
if (!priv->always_running)
66-
bd9576_wdt_disable(priv);
67-
else
68-
set_bit(WDOG_HW_RUNNING, &wdd->status);
64+
bd9576_wdt_disable(priv);
6965

7066
return 0;
7167
}
@@ -264,9 +260,6 @@ static int bd9576_wdt_probe(struct platform_device *pdev)
264260
if (ret)
265261
return ret;
266262

267-
priv->always_running = device_property_read_bool(dev->parent,
268-
"always-running");
269-
270263
watchdog_set_drvdata(&priv->wdd, priv);
271264

272265
priv->wdd.info = &bd957x_wdt_ident;
@@ -281,9 +274,6 @@ static int bd9576_wdt_probe(struct platform_device *pdev)
281274

282275
watchdog_stop_on_reboot(&priv->wdd);
283276

284-
if (priv->always_running)
285-
bd9576_wdt_start(&priv->wdd);
286-
287277
return devm_watchdog_register_device(dev, &priv->wdd);
288278
}
289279

drivers/watchdog/cpu5wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static void cpu5wdt_exit(void)
252252
if (cpu5wdt_device.queue) {
253253
cpu5wdt_device.queue = 0;
254254
wait_for_completion(&cpu5wdt_device.stop);
255-
del_timer(&cpu5wdt_device.timer);
255+
timer_shutdown_sync(&cpu5wdt_device.timer);
256256
}
257257

258258
misc_deregister(&cpu5wdt_misc);

0 commit comments

Comments
 (0)