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" <h...@zytor.com>
Cc: Ashok Raj <ashok....@intel.com>
Cc: Andi Kleen <andi.kl...@intel.com>
Cc: Tony Luck <tony.l...@intel.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Clemens Ladisch <clem...@ladisch.de>
Cc: Arnd Bergmann <a...@arndb.de>
Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Kate Stewart <kstew...@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael.j.wyso...@intel.com>
Cc: Mimi Zohar <zo...@linux.ibm.com>
Cc: Jan Kiszka <jan.kis...@siemens.com>
Cc: Nick Desaulniers <ndesaulni...@google.com>
Cc: Masahiro Yamada <yamada.masah...@socionext.com>
Cc: Nayna Jain <na...@linux.ibm.com>
Cc: Stephane Eranian <eran...@google.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Cc: "Ravi V. Shankar" <ravi.v.shan...@intel.com>
Cc: x...@kernel.org
Signed-off-by: Ricardo Neri <ricardo.neri-calde...@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

Reply via email to