From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAA03C433EF for ; Thu, 5 May 2022 23:58:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8676640C1F; Thu, 5 May 2022 23:58:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f6WSKYLfo67g; Thu, 5 May 2022 23:58:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 75A4440BE5; Thu, 5 May 2022 23:58:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5EB9AC0032; Thu, 5 May 2022 23:58:13 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1ECC5C0084 for ; Thu, 5 May 2022 23:58:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5426960BCA for ; Thu, 5 May 2022 23:57:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nEPH66qWpO_c for ; Thu, 5 May 2022 23:57:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by smtp3.osuosl.org (Postfix) with ESMTPS id A830860BFE for ; Thu, 5 May 2022 23:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651795075; x=1683331075; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=FvfOUL9RmgV913TUdo/h6z7c9UJ7bF06B9BxDFF6nMg=; b=AIGlhy1fAEZ0RguiMn14SUxgOV3dN5gByfFUUlPTIZxnZvYixOijwiTV tNIwMpBzOo/qg2aP28j3m2jK0xQux2yetLtVAljcqHKJcDCEZJ7NRyZYS 56JsKF5IEnw+RyRlEQi7DNzb7lc1CH9KXjrOSLwtrSmfbsaHZZPASw+Mj QdfBcrOtuDbdvJt7Q0/sERZonm4tE5HD94p03cTUFqOuRujgbrO0TPQMH By2ED/AQ43U78FPkccKz0ILaWl+67jXURLyJIV8S4X7VODu9F9mRdcaNK IlcAoDk5/ovllJmtP9nmUjFMGiyEpTpsuQHAfMimstmR0SEq/ATs71F/n w==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="293496365" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="293496365" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 16:57:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="694914437" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga004.jf.intel.com with ESMTP; 05 May 2022 16:57:55 -0700 From: Ricardo Neri To: Thomas Gleixner , x86@kernel.org Subject: [PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog" Date: Thu, 5 May 2022 17:00:03 -0700 Message-Id: <20220506000008.30892-25-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> Cc: "Ravi V. Shankar" , Andi Kleen , linuxppc-dev@lists.ozlabs.org, Ricardo Neri , Stephane Eranian , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Tony Luck , Nicholas Piggin , Ricardo Neri , Andrew Morton , David Woodhouse X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Prepare hardlockup_panic_setup() to handle a comma-separated list of options. Thus, it can continue parsing its own command-line options while ignoring parameters that are relevant only to specific implementations of the hardlockup detector. Such implementations may use an early_param to parse their own options. Cc: Andi Kleen Cc: Nicholas Piggin Cc: Stephane Eranian Cc: "Ravi V. Shankar" Cc: iommu@lists.linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org Cc: x86@kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- Changes since v5: * Corrected typo in commit message. (Tony) Changes since v4: * None Changes since v3: * None Changes since v2: * Introduced this patch. Changes since v1: * None --- kernel/watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 9166220457bc..6443841a755f 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -73,13 +73,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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FBFBC433EF for ; Fri, 6 May 2022 00:00:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387329AbiEFADs (ORCPT ); Thu, 5 May 2022 20:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387103AbiEFACS (ORCPT ); Thu, 5 May 2022 20:02:18 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C107612AF for ; Thu, 5 May 2022 16:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651795078; x=1683331078; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=FvfOUL9RmgV913TUdo/h6z7c9UJ7bF06B9BxDFF6nMg=; b=nfjf8IWlAdg8KzwOwjqHHoFRyVVECCYp7DMgn9tfMKdRGkhcdzjRQG7g JEQo9VxaZruTaAZ3B6VS7jc+9aVicHOe25v+/YkMDF+TAYITMxzhyUYq3 NYKzzFRxc3PaBth11ez97wcc5DvbDcxa6tNjYAwPIr83dpxhCeWTXmJk0 I6CBsukUhE8ldM+UOa1nQEGnYFJvW8jRFyLahswVqYWqp5lle0mg4pfHa B+vXyUxiuZ8Y9DiK3tHiDDs/h7o8LWBMqgXnCZ8dp427EYdqlFGjMoEc5 m1eLJIDCD9lsH+vFsAM8C7Xdz2/XLapXzonf4kjL/J4/E4jnUwPxC9FUB Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="250283657" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="250283657" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 16:57:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="694914437" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga004.jf.intel.com with ESMTP; 05 May 2022 16:57:55 -0700 From: Ricardo Neri To: Thomas Gleixner , x86@kernel.org Cc: Tony Luck , Andi Kleen , Stephane Eranian , Andrew Morton , Joerg Roedel , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Nicholas Piggin , "Ravi V. Shankar" , Ricardo Neri , iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog" Date: Thu, 5 May 2022 17:00:03 -0700 Message-Id: <20220506000008.30892-25-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prepare hardlockup_panic_setup() to handle a comma-separated list of options. Thus, it can continue parsing its own command-line options while ignoring parameters that are relevant only to specific implementations of the hardlockup detector. Such implementations may use an early_param to parse their own options. Cc: Andi Kleen Cc: Nicholas Piggin Cc: Stephane Eranian Cc: "Ravi V. Shankar" Cc: iommu@lists.linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org Cc: x86@kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- Changes since v5: * Corrected typo in commit message. (Tony) Changes since v4: * None Changes since v3: * None Changes since v2: * Introduced this patch. Changes since v1: * None --- kernel/watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 9166220457bc..6443841a755f 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -73,13 +73,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9317EC433F5 for ; Fri, 6 May 2022 00:14:07 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KvWJZ1wCbz3fQW for ; Fri, 6 May 2022 10:14:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PrzCMuJI; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=ricardo.neri-calderon@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PrzCMuJI; dkim-atps=neutral Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KvVzV25P2z3c9N for ; Fri, 6 May 2022 09:59:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651795158; x=1683331158; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=FvfOUL9RmgV913TUdo/h6z7c9UJ7bF06B9BxDFF6nMg=; b=PrzCMuJIim639ACRsz+AkoQADGiTr8rE7m+E4OGQltCeBhq9anWPQJIC T9Ks0mgDEC7s80pNWW+eF2PVoOQq8d1virF7Xe0Bglx9Eji/IeRZiNkiw p/U+FTZ3SAPOoHywd8GlciYbKlj6zV3qdlxGc0i7wvRjN+VKxlZ7/s2WA 6QIYe4YHd8aT2tAiarkCtxGv7sc4iMRRE3FN6lV3NW0iOADjY6Fsg4n2Y 1+fVrTZrbG20s5YGtGNZCRCTQiOgylJO0QZgtagWqGI3Xuy3TNC+jsRW8 cXLraZ5B31BvVyXhqpVnKYO+zue2ee2QMFP9arbqs1QMDtAIsIZA5K7Pd g==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="268437335" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="268437335" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 16:57:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="694914437" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga004.jf.intel.com with ESMTP; 05 May 2022 16:57:55 -0700 From: Ricardo Neri To: Thomas Gleixner , x86@kernel.org Subject: [PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog" Date: Thu, 5 May 2022 17:00:03 -0700 Message-Id: <20220506000008.30892-25-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Ravi V. Shankar" , Andi Kleen , linuxppc-dev@lists.ozlabs.org, Joerg Roedel , Ricardo Neri , Stephane Eranian , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Tony Luck , Nicholas Piggin , Suravee Suthikulpanit , Ricardo Neri , Andrew Morton , David Woodhouse , Lu Baolu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Prepare hardlockup_panic_setup() to handle a comma-separated list of options. Thus, it can continue parsing its own command-line options while ignoring parameters that are relevant only to specific implementations of the hardlockup detector. Such implementations may use an early_param to parse their own options. Cc: Andi Kleen Cc: Nicholas Piggin Cc: Stephane Eranian Cc: "Ravi V. Shankar" Cc: iommu@lists.linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org Cc: x86@kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- Changes since v5: * Corrected typo in commit message. (Tony) Changes since v4: * None Changes since v3: * None Changes since v2: * Introduced this patch. Changes since v1: * None --- kernel/watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 9166220457bc..6443841a755f 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -73,13 +73,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