* Forcing non-ACPI watchdog driver @ 2020-02-05 15:05 Jean Delvare 2020-02-05 15:24 ` Mika Westerberg 0 siblings, 1 reply; 9+ messages in thread From: Jean Delvare @ 2020-02-05 15:05 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Len Brown, linux-acpi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog, Mika Westerberg, Tom Abraham Hi all, Is there a way to prevent the ACPI WDAT watchdog interface from being used and force the use of a native watchdog driver instead? I have a customer who reports a regression on kernel upgrade. Old kernel (v4.4) uses iTCO_wdt and watchdog works, new kernel (v4.12) uses wdat_wdt and watchdog doesn't work (instant reboot when opening the device). While I'm going to look for fixes to backport, I think it would be pretty convenient to have a way to just revert to the working driver until the new driver is fixed somehow. But I can't see any way to do that at the moment, short of disabling ACPI completely, which is definitely too extreme to be considered. Am I missing something? Thanks, -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-05 15:05 Forcing non-ACPI watchdog driver Jean Delvare @ 2020-02-05 15:24 ` Mika Westerberg 2020-02-05 16:30 ` Guenter Roeck 0 siblings, 1 reply; 9+ messages in thread From: Mika Westerberg @ 2020-02-05 15:24 UTC (permalink / raw) To: Jean Delvare Cc: Rafael J. Wysocki, Len Brown, linux-acpi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog, Tom Abraham On Wed, Feb 05, 2020 at 04:05:29PM +0100, Jean Delvare wrote: > Hi all, Hi, > Is there a way to prevent the ACPI WDAT watchdog interface from being > used and force the use of a native watchdog driver instead? > > I have a customer who reports a regression on kernel upgrade. Old > kernel (v4.4) uses iTCO_wdt and watchdog works, new kernel (v4.12) uses > wdat_wdt and watchdog doesn't work (instant reboot when opening the > device). While I'm going to look for fixes to backport, I think it > would be pretty convenient to have a way to just revert to the working > driver until the new driver is fixed somehow. But I can't see any way > to do that at the moment, short of disabling ACPI completely, which is > definitely too extreme to be considered. > > Am I missing something? You should be able to revert to iTCO_wdt by simply disabling CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false which means that iTCO_wdt is used instead. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-05 15:24 ` Mika Westerberg @ 2020-02-05 16:30 ` Guenter Roeck 2020-02-05 16:38 ` Mika Westerberg 0 siblings, 1 reply; 9+ messages in thread From: Guenter Roeck @ 2020-02-05 16:30 UTC (permalink / raw) To: Mika Westerberg Cc: Jean Delvare, Rafael J. Wysocki, Len Brown, linux-acpi, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > On Wed, Feb 05, 2020 at 04:05:29PM +0100, Jean Delvare wrote: > > Hi all, > > Hi, > > > Is there a way to prevent the ACPI WDAT watchdog interface from being > > used and force the use of a native watchdog driver instead? > > > > I have a customer who reports a regression on kernel upgrade. Old > > kernel (v4.4) uses iTCO_wdt and watchdog works, new kernel (v4.12) uses > > wdat_wdt and watchdog doesn't work (instant reboot when opening the > > device). While I'm going to look for fixes to backport, I think it > > would be pretty convenient to have a way to just revert to the working > > driver until the new driver is fixed somehow. But I can't see any way > > to do that at the moment, short of disabling ACPI completely, which is > > definitely too extreme to be considered. > > > > Am I missing something? > > You should be able to revert to iTCO_wdt by simply disabling > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > which means that iTCO_wdt is used instead. That may not be possible in a generic distribution. Guenter ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-05 16:30 ` Guenter Roeck @ 2020-02-05 16:38 ` Mika Westerberg 2020-02-06 14:45 ` Jean Delvare 0 siblings, 1 reply; 9+ messages in thread From: Mika Westerberg @ 2020-02-05 16:38 UTC (permalink / raw) To: Guenter Roeck Cc: Jean Delvare, Rafael J. Wysocki, Len Brown, linux-acpi, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Wed, Feb 05, 2020 at 08:30:48AM -0800, Guenter Roeck wrote: > On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > > On Wed, Feb 05, 2020 at 04:05:29PM +0100, Jean Delvare wrote: > > > Hi all, > > > > Hi, > > > > > Is there a way to prevent the ACPI WDAT watchdog interface from being > > > used and force the use of a native watchdog driver instead? > > > > > > I have a customer who reports a regression on kernel upgrade. Old > > > kernel (v4.4) uses iTCO_wdt and watchdog works, new kernel (v4.12) uses > > > wdat_wdt and watchdog doesn't work (instant reboot when opening the > > > device). While I'm going to look for fixes to backport, I think it > > > would be pretty convenient to have a way to just revert to the working > > > driver until the new driver is fixed somehow. But I can't see any way > > > to do that at the moment, short of disabling ACPI completely, which is > > > definitely too extreme to be considered. > > > > > > Am I missing something? > > > > You should be able to revert to iTCO_wdt by simply disabling > > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > > which means that iTCO_wdt is used instead. > > That may not be possible in a generic distribution. Right, they would need to build their own kernel. Currently there is no way to do that without changing .config. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-05 16:38 ` Mika Westerberg @ 2020-02-06 14:45 ` Jean Delvare 2020-02-06 14:56 ` Mika Westerberg 0 siblings, 1 reply; 9+ messages in thread From: Jean Delvare @ 2020-02-06 14:45 UTC (permalink / raw) To: Mika Westerberg Cc: Guenter Roeck, Rafael J. Wysocki, Len Brown, linux-acpi, Wim Van Sebroeck, linux-watchdog, Tom Abraham Hi Mika, On Wed, 5 Feb 2020 18:38:31 +0200, Mika Westerberg wrote: > On Wed, Feb 05, 2020 at 08:30:48AM -0800, Guenter Roeck wrote: > > On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > > > You should be able to revert to iTCO_wdt by simply disabling > > > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > > > which means that iTCO_wdt is used instead. > > > > That may not be possible in a generic distribution. > > Right, they would need to build their own kernel. Currently there is no > way to do that without changing .config. OK, that's pretty much what I was compl^Wworried about ;-) Would you consider applying something like the following patch? From: Jean Delvare <jdelvare@suse.de> Subject: ACPI / watchdog: Allow disabling WDAT at boot In case the WDAT interface is broken, give the user the option to ignore it to let a native driver bind to the watchdog device instead. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- Documentation/admin-guide/kernel-parameters.txt | 4 ++++ drivers/acpi/acpi_watchdog.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) --- linux-5.4.orig/drivers/acpi/acpi_watchdog.c 2020-02-06 15:20:27.187333079 +0100 +++ linux-5.4/drivers/acpi/acpi_watchdog.c 2020-02-06 15:30:08.707408406 +0100 @@ -55,12 +55,14 @@ static bool acpi_watchdog_uses_rtc(const } #endif +static bool acpi_no_watchdog; + static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void) { const struct acpi_table_wdat *wdat = NULL; acpi_status status; - if (acpi_disabled) + if (acpi_disabled || acpi_no_watchdog) return NULL; status = acpi_get_table(ACPI_SIG_WDAT, 0, @@ -88,6 +90,14 @@ bool acpi_has_watchdog(void) } EXPORT_SYMBOL_GPL(acpi_has_watchdog); +/* ACPI watchdog can be disabled on boot command line */ +static int __init disable_acpi_watchdog(char *str) +{ + acpi_no_watchdog = true; + return 1; +} +__setup("acpi_no_watchdog", disable_acpi_watchdog); + void __init acpi_watchdog_init(void) { const struct acpi_wdat_entry *entries; --- linux-5.4.orig/Documentation/admin-guide/kernel-parameters.txt 2020-02-06 15:20:27.187333079 +0100 +++ linux-5.4/Documentation/admin-guide/kernel-parameters.txt 2020-02-06 15:31:16.614155680 +0100 @@ -136,6 +136,10 @@ dynamic table installation which will install SSDT tables to /sys/firmware/acpi/tables/dynamic. + acpi_no_watchdog [HW,ACPI,WDT] + Ignore the ACPI-based watchdog interface (WDAT) and let + a native driver control the watchdog device instead. + acpi_rsdp= [ACPI,EFI,KEXEC] Pass the RSDP address to the kernel, mostly used on machines running EFI runtime service to boot the Thanks, -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-06 14:45 ` Jean Delvare @ 2020-02-06 14:56 ` Mika Westerberg 2020-02-06 15:50 ` Rafael J. Wysocki 0 siblings, 1 reply; 9+ messages in thread From: Mika Westerberg @ 2020-02-06 14:56 UTC (permalink / raw) To: Jean Delvare Cc: Guenter Roeck, Rafael J. Wysocki, Len Brown, linux-acpi, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Thu, Feb 06, 2020 at 03:45:32PM +0100, Jean Delvare wrote: > Hi Mika, > > On Wed, 5 Feb 2020 18:38:31 +0200, Mika Westerberg wrote: > > On Wed, Feb 05, 2020 at 08:30:48AM -0800, Guenter Roeck wrote: > > > On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > > > > You should be able to revert to iTCO_wdt by simply disabling > > > > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > > > > which means that iTCO_wdt is used instead. > > > > > > That may not be possible in a generic distribution. > > > > Right, they would need to build their own kernel. Currently there is no > > way to do that without changing .config. > > OK, that's pretty much what I was compl^Wworried about ;-) Would you > consider applying something like the following patch? Yes, I think the patch makes sense. Rafael, I guess you will take this since it is touching ACPI? > From: Jean Delvare <jdelvare@suse.de> > Subject: ACPI / watchdog: Allow disabling WDAT at boot > > In case the WDAT interface is broken, give the user the option to > ignore it to let a native driver bind to the watchdog device instead. > > Signed-off-by: Jean Delvare <jdelvare@suse.de> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > --- > Documentation/admin-guide/kernel-parameters.txt | 4 ++++ > drivers/acpi/acpi_watchdog.c | 12 +++++++++++- > 2 files changed, 15 insertions(+), 1 deletion(-) > > --- linux-5.4.orig/drivers/acpi/acpi_watchdog.c 2020-02-06 15:20:27.187333079 +0100 > +++ linux-5.4/drivers/acpi/acpi_watchdog.c 2020-02-06 15:30:08.707408406 +0100 > @@ -55,12 +55,14 @@ static bool acpi_watchdog_uses_rtc(const > } > #endif > > +static bool acpi_no_watchdog; > + > static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void) > { > const struct acpi_table_wdat *wdat = NULL; > acpi_status status; > > - if (acpi_disabled) > + if (acpi_disabled || acpi_no_watchdog) > return NULL; > > status = acpi_get_table(ACPI_SIG_WDAT, 0, > @@ -88,6 +90,14 @@ bool acpi_has_watchdog(void) > } > EXPORT_SYMBOL_GPL(acpi_has_watchdog); > > +/* ACPI watchdog can be disabled on boot command line */ > +static int __init disable_acpi_watchdog(char *str) > +{ > + acpi_no_watchdog = true; > + return 1; > +} > +__setup("acpi_no_watchdog", disable_acpi_watchdog); > + > void __init acpi_watchdog_init(void) > { > const struct acpi_wdat_entry *entries; > --- linux-5.4.orig/Documentation/admin-guide/kernel-parameters.txt 2020-02-06 15:20:27.187333079 +0100 > +++ linux-5.4/Documentation/admin-guide/kernel-parameters.txt 2020-02-06 15:31:16.614155680 +0100 > @@ -136,6 +136,10 @@ > dynamic table installation which will install SSDT > tables to /sys/firmware/acpi/tables/dynamic. > > + acpi_no_watchdog [HW,ACPI,WDT] > + Ignore the ACPI-based watchdog interface (WDAT) and let > + a native driver control the watchdog device instead. > + > acpi_rsdp= [ACPI,EFI,KEXEC] > Pass the RSDP address to the kernel, mostly used > on machines running EFI runtime service to boot the > > Thanks, > -- > Jean Delvare > SUSE L3 Support ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-06 14:56 ` Mika Westerberg @ 2020-02-06 15:50 ` Rafael J. Wysocki 2020-02-06 16:00 ` Rafael J. Wysocki 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki @ 2020-02-06 15:50 UTC (permalink / raw) To: Mika Westerberg Cc: Jean Delvare, Guenter Roeck, Rafael J. Wysocki, Len Brown, ACPI Devel Maling List, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Thu, Feb 6, 2020 at 3:56 PM Mika Westerberg <mika.westerberg@linux.intel.com> wrote: > > On Thu, Feb 06, 2020 at 03:45:32PM +0100, Jean Delvare wrote: > > Hi Mika, > > > > On Wed, 5 Feb 2020 18:38:31 +0200, Mika Westerberg wrote: > > > On Wed, Feb 05, 2020 at 08:30:48AM -0800, Guenter Roeck wrote: > > > > On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > > > > > You should be able to revert to iTCO_wdt by simply disabling > > > > > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > > > > > which means that iTCO_wdt is used instead. > > > > > > > > That may not be possible in a generic distribution. > > > > > > Right, they would need to build their own kernel. Currently there is no > > > way to do that without changing .config. > > > > OK, that's pretty much what I was compl^Wworried about ;-) Would you > > consider applying something like the following patch? > > Yes, I think the patch makes sense. > > Rafael, I guess you will take this since it is touching ACPI? Yes, I will. > > From: Jean Delvare <jdelvare@suse.de> > > Subject: ACPI / watchdog: Allow disabling WDAT at boot > > > > In case the WDAT interface is broken, give the user the option to > > ignore it to let a native driver bind to the watchdog device instead. > > > > Signed-off-by: Jean Delvare <jdelvare@suse.de> > > Cc: Guenter Roeck <linux@roeck-us.net> > > Cc: Mika Westerberg <mika.westerberg@linux.intel.com> > > Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-06 15:50 ` Rafael J. Wysocki @ 2020-02-06 16:00 ` Rafael J. Wysocki 2020-02-06 19:14 ` Mika Westerberg 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki @ 2020-02-06 16:00 UTC (permalink / raw) To: Mika Westerberg, Jean Delvare Cc: Guenter Roeck, Rafael J. Wysocki, Len Brown, ACPI Devel Maling List, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Thu, Feb 6, 2020 at 4:50 PM Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Thu, Feb 6, 2020 at 3:56 PM Mika Westerberg > <mika.westerberg@linux.intel.com> wrote: > > > > On Thu, Feb 06, 2020 at 03:45:32PM +0100, Jean Delvare wrote: > > > Hi Mika, > > > > > > On Wed, 5 Feb 2020 18:38:31 +0200, Mika Westerberg wrote: > > > > On Wed, Feb 05, 2020 at 08:30:48AM -0800, Guenter Roeck wrote: > > > > > On Wed, Feb 05, 2020 at 05:24:35PM +0200, Mika Westerberg wrote: > > > > > > You should be able to revert to iTCO_wdt by simply disabling > > > > > > CONFIG_WDAT_WDT from .config. Then acpi_has_watchdog() returns false > > > > > > which means that iTCO_wdt is used instead. > > > > > > > > > > That may not be possible in a generic distribution. > > > > > > > > Right, they would need to build their own kernel. Currently there is no > > > > way to do that without changing .config. > > > > > > OK, that's pretty much what I was compl^Wworried about ;-) Would you > > > consider applying something like the following patch? > > > > Yes, I think the patch makes sense. > > > > Rafael, I guess you will take this since it is touching ACPI? > > Yes, I will. So queued up now (with very minor changes in the subject and changelog), but I will rebase it on top of -rc1 when it is out. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Forcing non-ACPI watchdog driver 2020-02-06 16:00 ` Rafael J. Wysocki @ 2020-02-06 19:14 ` Mika Westerberg 0 siblings, 0 replies; 9+ messages in thread From: Mika Westerberg @ 2020-02-06 19:14 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Jean Delvare, Guenter Roeck, Rafael J. Wysocki, Len Brown, ACPI Devel Maling List, Wim Van Sebroeck, linux-watchdog, Tom Abraham On Thu, Feb 06, 2020 at 05:00:43PM +0100, Rafael J. Wysocki wrote: > So queued up now (with very minor changes in the subject and > changelog), but I will rebase it on top of -rc1 when it is out. Thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-02-06 19:14 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-05 15:05 Forcing non-ACPI watchdog driver Jean Delvare 2020-02-05 15:24 ` Mika Westerberg 2020-02-05 16:30 ` Guenter Roeck 2020-02-05 16:38 ` Mika Westerberg 2020-02-06 14:45 ` Jean Delvare 2020-02-06 14:56 ` Mika Westerberg 2020-02-06 15:50 ` Rafael J. Wysocki 2020-02-06 16:00 ` Rafael J. Wysocki 2020-02-06 19:14 ` Mika Westerberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).