Skip to content

Commit f2a1853

Browse files
jdelvaregregkh
authored andcommitted
ACPI: watchdog: Allow disabling WDAT at boot
[ Upstream commit 3f9e12e ] In case the WDAT interface is broken, give the user an option to ignore it to let a native driver bind to the watchdog device instead. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 22333af commit f2a1853

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Documentation/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
335335
dynamic table installation which will install SSDT
336336
tables to /sys/firmware/acpi/tables/dynamic.
337337

338+
acpi_no_watchdog [HW,ACPI,WDT]
339+
Ignore the ACPI-based watchdog interface (WDAT) and let
340+
a native driver control the watchdog device instead.
341+
338342
acpi_rsdp= [ACPI,EFI,KEXEC]
339343
Pass the RSDP address to the kernel, mostly used
340344
on machines running EFI runtime service to boot the

drivers/acpi/acpi_watchdog.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
5858
}
5959
#endif
6060

61+
static bool acpi_no_watchdog;
62+
6163
static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
6264
{
6365
const struct acpi_table_wdat *wdat = NULL;
6466
acpi_status status;
6567

66-
if (acpi_disabled)
68+
if (acpi_disabled || acpi_no_watchdog)
6769
return NULL;
6870

6971
status = acpi_get_table(ACPI_SIG_WDAT, 0,
@@ -91,6 +93,14 @@ bool acpi_has_watchdog(void)
9193
}
9294
EXPORT_SYMBOL_GPL(acpi_has_watchdog);
9395

96+
/* ACPI watchdog can be disabled on boot command line */
97+
static int __init disable_acpi_watchdog(char *str)
98+
{
99+
acpi_no_watchdog = true;
100+
return 1;
101+
}
102+
__setup("acpi_no_watchdog", disable_acpi_watchdog);
103+
94104
void __init acpi_watchdog_init(void)
95105
{
96106
const struct acpi_wdat_entry *entries;

0 commit comments

Comments
 (0)