Skip to content

Commit 3f9e12e

Browse files
jdelvarerafaeljw
authored andcommitted
ACPI: watchdog: Allow disabling WDAT at boot
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]>
1 parent bb6d3fb commit 3f9e12e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@
136136
dynamic table installation which will install SSDT
137137
tables to /sys/firmware/acpi/tables/dynamic.
138138

139+
acpi_no_watchdog [HW,ACPI,WDT]
140+
Ignore the ACPI-based watchdog interface (WDAT) and let
141+
a native driver control the watchdog device instead.
142+
139143
acpi_rsdp= [ACPI,EFI,KEXEC]
140144
Pass the RSDP address to the kernel, mostly used
141145
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
@@ -55,12 +55,14 @@ static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
5555
}
5656
#endif
5757

58+
static bool acpi_no_watchdog;
59+
5860
static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
5961
{
6062
const struct acpi_table_wdat *wdat = NULL;
6163
acpi_status status;
6264

63-
if (acpi_disabled)
65+
if (acpi_disabled || acpi_no_watchdog)
6466
return NULL;
6567

6668
status = acpi_get_table(ACPI_SIG_WDAT, 0,
@@ -88,6 +90,14 @@ bool acpi_has_watchdog(void)
8890
}
8991
EXPORT_SYMBOL_GPL(acpi_has_watchdog);
9092

93+
/* ACPI watchdog can be disabled on boot command line */
94+
static int __init disable_acpi_watchdog(char *str)
95+
{
96+
acpi_no_watchdog = true;
97+
return 1;
98+
}
99+
__setup("acpi_no_watchdog", disable_acpi_watchdog);
100+
91101
void __init acpi_watchdog_init(void)
92102
{
93103
const struct acpi_wdat_entry *entries;

0 commit comments

Comments
 (0)