lkml.org 
[lkml]   [2019]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 13/14] watchdog/hardlockup/hpet: Only enable the HPET watchdog via a boot parameter
On Wed, 27 Feb 2019, Ricardo Neri wrote:
> + When hpet is specified, the NMI watchdog will be driven
> + by an HPET timer, if available in the system. Otherwise,
> + the perf-based implementation will be used. Specifying
> + hpet implies that nmi_watchdog is on.

How so?

> +static int __init hardlockup_detector_hpet_setup(char *str)
> +{
> + if (strstr(str, "hpet"))
> + hardlockup_use_hpet = true;

strstr()? Not really.

> +
> + return 0;
> +}
> +__setup("nmi_watchdog=", hardlockup_detector_hpet_setup);
> +
> /**
> * hardlockup_detector_hpet_init() - Initialize the hardlockup detector
> *
> @@ -405,6 +422,9 @@ int __init hardlockup_detector_hpet_init(void)
> {
> int ret;
>
> + if (!hardlockup_use_hpet)
> + return -ENODEV;

This should have been there in the patch which introduces
hardlockup_detector_hpet_init(). And this patch merily adds the command
line magic which sets that flag.

> +
> if (!is_hpet_enabled())
> return -ENODEV;
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 367aa81294ef..28cad7310378 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -78,7 +78,7 @@ static int __init hardlockup_panic_setup(char *str)
> nmi_watchdog_user_enabled = 0;
> else if (!strncmp(str, "1", 1))
> nmi_watchdog_user_enabled = 1;
> - return 1;
> + return 0;

Why?

Thanks,

tglx


\
 
 \ /
  Last update: 2019-03-26 22:31    [W:0.182 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site