Messages in this thread Patch in this message | | | From | Ricardo Neri <> | Subject | [RFC PATCH v3 14/21] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog" | Date | Tue, 14 May 2019 07:02:07 -0700 |
| |
Prepare hardlockup_panic_setup() to handle a comma-separated list of options. This is needed to pass options to specific implementations of the hardlockup detector.
Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ashok Raj <ashok.raj@intel.com> Cc: Andi Kleen <andi.kleen@intel.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Mimi Zohar <zohar@linux.ibm.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Nayna Jain <nayna@linux.ibm.com> Cc: Stephane Eranian <eranian@google.com> Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Cc: "Ravi V. Shankar" <ravi.v.shankar@intel.com> Cc: x86@kernel.org Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> --- kernel/watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index be589001200a..fd50049449ec 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -70,13 +70,13 @@ void __init hardlockup_detector_disable(void) static int __init hardlockup_panic_setup(char *str) { - if (!strncmp(str, "panic", 5)) + if (parse_option_str(str, "panic")) hardlockup_panic = 1; - else if (!strncmp(str, "nopanic", 7)) + else if (parse_option_str(str, "nopanic")) hardlockup_panic = 0; - else if (!strncmp(str, "0", 1)) + else if (parse_option_str(str, "0")) nmi_watchdog_user_enabled = 0; - else if (!strncmp(str, "1", 1)) + else if (parse_option_str(str, "1")) nmi_watchdog_user_enabled = 1; return 1; } -- 2.17.1
| |