Re: Forcing non-ACPI watchdog driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> 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@xxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Acked-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

> Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux