From patchwork Mon Apr 29 19:28:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10922427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18DDC14C0 for ; Mon, 29 Apr 2019 19:28:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0952F28904 for ; Mon, 29 Apr 2019 19:28:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFC21289DD; Mon, 29 Apr 2019 19:28:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 770EE28904 for ; Mon, 29 Apr 2019 19:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729191AbfD2T2g (ORCPT ); Mon, 29 Apr 2019 15:28:36 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42115 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728928AbfD2T2g (ORCPT ); Mon, 29 Apr 2019 15:28:36 -0400 Received: by mail-pf1-f193.google.com with SMTP id w25so5807490pfi.9; Mon, 29 Apr 2019 12:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=H3PC/K/0ZqnTv3eSdr7uwHLRMhRxA2po4zeZwBa0UC4=; b=TwcT4QvqRGp1uG/FKCJtxf3DZL4NQG3jTbez+WjIbEICTnsZJmQYLihck1du341mg2 vQTcbUkK7dV/ZEEwctyNaD1+TtAiJcKTBXcwZ9rLEV5QphcRn2mzCkiZe6AKH4dcraDb slMQVVcbd3U6arhgfA+D1uNRmFp6HHXEAvMxUneBjs4OPgcaHZ1P+lb3bV1sryGH/aHT OabBR26UgAPBD7R1EOtYuATG1kr0q0OgEVNBAc5/q6nYwhEuh5j8aYMIK7wXZMctKS4b bNThq0SCCQcqLNvjiu6eUXEwPWRXwkhqt38vsp4eW3/5jvZS9+E4yM+EQ58GbA4Thw5O cgSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=H3PC/K/0ZqnTv3eSdr7uwHLRMhRxA2po4zeZwBa0UC4=; b=KH99hO2rPPHzOqgXpFlos7XAwrwyuqEKzEx3m8UJL5Bg40hgMgp+89AuF7WwDGWKJn ONl8bHAZRV/Pj5Lp+Az+52YYzwtiOT00w7DTKYhKKydzKlDR8vX3jkxN7QQ++ktnnGrk mMx8S5eglXYQ+ut/R5IZ1k6OMe6XhE5BKD7utdke6t4OCdao+id7tGHgHH95VgnFnWfQ h+ALuWB+IT2bq5zIrM6TovPDQwT4EJKzgJ/wOVIO+ERI6Ykq46vZYzLG9XhHj9Wg2dI4 kdp9D05yjQrIRtQC3wRsTViA0CPkoTVh7iIebIjk1SlCQs0XnHivIj4gnuxMVzlqnDPa bQqQ== X-Gm-Message-State: APjAAAXieRjDZjCgcn9XXYW/J/lAwsrWIFbuKdBrhGpz+Cf4ssYzyJPO zFUVlxa5TGYMjz59qz9L52s= X-Google-Smtp-Source: APXvYqwFy0ULEpsCLz4AaUm4VSDQbG86sGUaLA0oHgtneY4zjk8RmxpDxMHYCUCsO5tK1sVozPbuMg== X-Received: by 2002:aa7:918b:: with SMTP id x11mr31520922pfa.181.1556566115361; Mon, 29 Apr 2019 12:28:35 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id y3sm10598535pfe.9.2019.04.29.12.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 12:28:34 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: Paul Gortmaker , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 1/5] watchdog: Use depends instead of select for pretimeout governors Date: Mon, 29 Apr 2019 12:28:27 -0700 Message-Id: <1556566111-31970-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Watchdog pretimeout governors were enabled from the default governor selection using "select". As a result, the default governor was always built into the kernel, even if no watchdog driver was loaded. By using "depends on" instead of "select", we are in better control, and the governors can all be built as modules. At the same time, set the default configuration option for pretimeout governors to match WATCHDOG_CORE (meaning all pretimeout governors are by default enabled if pretimeout support is enabled). The practical impact of this change is minimal. Previously, selecting a default governor automatically enabled that governor. Now, a default governor can only be selected if that governor has been enabled. Consequently, the order of governor selection is now reversed: The governor selection is now first, followed by default governor selection. Signed-off-by: Guenter Roeck --- drivers/watchdog/Kconfig | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 16c30e6aa1ee..accbf75032ef 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -2062,6 +2062,20 @@ config WATCHDOG_PRETIMEOUT_GOV if WATCHDOG_PRETIMEOUT_GOV +config WATCHDOG_PRETIMEOUT_GOV_NOOP + tristate "Noop watchdog pretimeout governor" + default WATCHDOG_CORE + help + Noop watchdog pretimeout governor, only an informational + message is added to kernel log buffer. + +config WATCHDOG_PRETIMEOUT_GOV_PANIC + tristate "Panic watchdog pretimeout governor" + default WATCHDOG_CORE + help + Panic watchdog pretimeout governor, on watchdog pretimeout + event put the kernel into panic. + choice prompt "Default Watchdog Pretimeout Governor" default WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC @@ -2072,7 +2086,7 @@ choice config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP bool "noop" - select WATCHDOG_PRETIMEOUT_GOV_NOOP + depends on WATCHDOG_PRETIMEOUT_GOV_NOOP help Use noop watchdog pretimeout governor by default. If noop governor is selected by a user, write a short message to @@ -2080,7 +2094,7 @@ config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC bool "panic" - select WATCHDOG_PRETIMEOUT_GOV_PANIC + depends on WATCHDOG_PRETIMEOUT_GOV_PANIC help Use panic watchdog pretimeout governor by default, if a watchdog pretimeout event happens, consider that @@ -2088,18 +2102,6 @@ config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC endchoice -config WATCHDOG_PRETIMEOUT_GOV_NOOP - tristate "Noop watchdog pretimeout governor" - help - Noop watchdog pretimeout governor, only an informational - message is added to kernel log buffer. - -config WATCHDOG_PRETIMEOUT_GOV_PANIC - tristate "Panic watchdog pretimeout governor" - help - Panic watchdog pretimeout governor, on watchdog pretimeout - event put the kernel into panic. - endif # WATCHDOG_PRETIMEOUT_GOV endif # WATCHDOG From patchwork Mon Apr 29 19:28:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10922433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F8C414C0 for ; Mon, 29 Apr 2019 19:28:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D3428905 for ; Mon, 29 Apr 2019 19:28:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14601288AA; Mon, 29 Apr 2019 19:28:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 019FA288AA for ; Mon, 29 Apr 2019 19:28:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729251AbfD2T2j (ORCPT ); Mon, 29 Apr 2019 15:28:39 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:39187 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbfD2T2h (ORCPT ); Mon, 29 Apr 2019 15:28:37 -0400 Received: by mail-pl1-f196.google.com with SMTP id e92so5543717plb.6; Mon, 29 Apr 2019 12:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=N16LaqSXsujrM14YSLIl8eePsGRALjhHNphPHlzavCU=; b=QnLEK9nPx93FypGtYt83qsBuN4twcEfhXjDmYpeJYXc5FAP6z5OHHbGoO1v7/3yEEH 2qElset2x/BdOCz4a7q9QSa9bJG4PMH5xt/xM+U5dmul1RbeG8p0WoWmIPwTIjCEvW6l Pj8Hr9poK2w/zpeCbf7JdC2szhNrblS8S50r9nIHOf5pWT2gVSIHODYTsEyNnXT8HI9c iwUipWzG3QDub1obyT0746RnmauJ8juGLju4D3us5pBfFXewN09/Fepjltengl2HzCqD ndWCca9dcioLJuzd0HvBBbNNZtRdKuT0s0BEc3wzRzy4l1f91EE3MjPBApn0NfW1FiMt oAaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=N16LaqSXsujrM14YSLIl8eePsGRALjhHNphPHlzavCU=; b=D/auvxGXkQMft/Eh0pGjMiFiGMC6gX5uQZILWl6YrAIxR2vNDCJJxwAOoo34gThKDa FQF9xxjZ4rpH/gf9jtA3tZu7oRemaDCVIU2L9l8WDL/Y3SjsWm0NWHsVODLEeLHQITCM F9Y8IAXUkrcm5ZXqSPLunzMHuViddYkOJyByl0g7w+4lQ4uowCGCoQj15cOKDrjFsYkv mNY4uq8P79neByviYCWDbLS9TBay8beXroD5gqMsRo29f/LpoQdlm1THzWYWdF9SG0Pl +9blRL1IJKUEZh0ibx38IZsj/dJXZngyUSocjHABti0vYoEwBiiVamtPz3yCuTDSDv8y 09cw== X-Gm-Message-State: APjAAAWD8gfVGZt3tux2dM0sA27p77oDpn58oYkr3clfD5zryOWFATFs eM/+jEVmJzmiFbzfg3WO7OA= X-Google-Smtp-Source: APXvYqyfuGRoFhbNJ4GBIrQRUhkWfflW8mvlVE3AjOe4mbRBZzcfDkeC1KH3Y4zSsDWLzMbodl/TDQ== X-Received: by 2002:a17:902:bf4a:: with SMTP id u10mr31756026pls.63.1556566116820; Mon, 29 Apr 2019 12:28:36 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id a9sm45791477pfo.17.2019.04.29.12.28.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 12:28:36 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: Paul Gortmaker , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 2/5] watchdog: Move pretimeout governor configuration up Date: Mon, 29 Apr 2019 12:28:28 -0700 Message-Id: <1556566111-31970-2-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556566111-31970-1-git-send-email-linux@roeck-us.net> References: <1556566111-31970-1-git-send-email-linux@roeck-us.net> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Watchdog pretimeout configuration was at the end of the Kconfig file, after individual watchdog drivers, and thus easy to miss. Move it right after basic watchdog option declarations. Signed-off-by: Guenter Roeck --- drivers/watchdog/Kconfig | 104 +++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index accbf75032ef..ac37a14439c7 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -63,6 +63,58 @@ config WATCHDOG_SYSFS Say Y here if you want to enable watchdog device status read through sysfs attributes. +comment "Watchdog Pretimeout Governors" + +config WATCHDOG_PRETIMEOUT_GOV + bool "Enable watchdog pretimeout governors" + depends on WATCHDOG_CORE + help + The option allows to select watchdog pretimeout governors. + +if WATCHDOG_PRETIMEOUT_GOV + +config WATCHDOG_PRETIMEOUT_GOV_NOOP + tristate "Noop watchdog pretimeout governor" + default WATCHDOG_CORE + help + Noop watchdog pretimeout governor, only an informational + message is added to kernel log buffer. + +config WATCHDOG_PRETIMEOUT_GOV_PANIC + tristate "Panic watchdog pretimeout governor" + default WATCHDOG_CORE + help + Panic watchdog pretimeout governor, on watchdog pretimeout + event put the kernel into panic. + +choice + prompt "Default Watchdog Pretimeout Governor" + default WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC + help + This option selects a default watchdog pretimeout governor. + The governor takes its action, if a watchdog is capable + to report a pretimeout event. + +config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP + bool "noop" + depends on WATCHDOG_PRETIMEOUT_GOV_NOOP + help + Use noop watchdog pretimeout governor by default. If noop + governor is selected by a user, write a short message to + the kernel log buffer and don't do any system changes. + +config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC + bool "panic" + depends on WATCHDOG_PRETIMEOUT_GOV_PANIC + help + Use panic watchdog pretimeout governor by default, if + a watchdog pretimeout event happens, consider that + a watchdog feeder is dead and reboot is unavoidable. + +endchoice + +endif # WATCHDOG_PRETIMEOUT_GOV + # # General Watchdog drivers # @@ -2052,56 +2104,4 @@ config USBPCWATCHDOG Most people will say N. -comment "Watchdog Pretimeout Governors" - -config WATCHDOG_PRETIMEOUT_GOV - bool "Enable watchdog pretimeout governors" - depends on WATCHDOG_CORE - help - The option allows to select watchdog pretimeout governors. - -if WATCHDOG_PRETIMEOUT_GOV - -config WATCHDOG_PRETIMEOUT_GOV_NOOP - tristate "Noop watchdog pretimeout governor" - default WATCHDOG_CORE - help - Noop watchdog pretimeout governor, only an informational - message is added to kernel log buffer. - -config WATCHDOG_PRETIMEOUT_GOV_PANIC - tristate "Panic watchdog pretimeout governor" - default WATCHDOG_CORE - help - Panic watchdog pretimeout governor, on watchdog pretimeout - event put the kernel into panic. - -choice - prompt "Default Watchdog Pretimeout Governor" - default WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC - help - This option selects a default watchdog pretimeout governor. - The governor takes its action, if a watchdog is capable - to report a pretimeout event. - -config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP - bool "noop" - depends on WATCHDOG_PRETIMEOUT_GOV_NOOP - help - Use noop watchdog pretimeout governor by default. If noop - governor is selected by a user, write a short message to - the kernel log buffer and don't do any system changes. - -config WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC - bool "panic" - depends on WATCHDOG_PRETIMEOUT_GOV_PANIC - help - Use panic watchdog pretimeout governor by default, if - a watchdog pretimeout event happens, consider that - a watchdog feeder is dead and reboot is unavoidable. - -endchoice - -endif # WATCHDOG_PRETIMEOUT_GOV - endif # WATCHDOG From patchwork Mon Apr 29 19:28:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10922435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30B2E15A6 for ; Mon, 29 Apr 2019 19:28:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 236B828715 for ; Mon, 29 Apr 2019 19:28:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2151F28939; Mon, 29 Apr 2019 19:28:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB47728715 for ; Mon, 29 Apr 2019 19:28:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729167AbfD2T2w (ORCPT ); Mon, 29 Apr 2019 15:28:52 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38143 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728928AbfD2T2j (ORCPT ); Mon, 29 Apr 2019 15:28:39 -0400 Received: by mail-pl1-f195.google.com with SMTP id f36so5548508plb.5; Mon, 29 Apr 2019 12:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=deTq7zeUED64od4fxOGcfQd1MxzcfH878U7uEsrlFg4=; b=WdBnsoM+xtup++LTNtJ78lv82AKUx20pvpS8dsymvIdduNB9EOBTazCYhvjgBc+imX Ix/uW852adQWx4pBgr5eUXQG/5XDh6hyL8Nmfo+y79Qr4TiC52r8fpGh+qX8Q0OwXAnz E5lxHA6bHRgWH3zSrbUKMjAvXpboT9nHm6cVzWuMGxVu737bg7/7GXzdjXBkypcv3XRm SqAEhkN6qrupI4aiohwuppefngKm1ZI5XgWKclBwkgyfOFT5f60CS1+QAY6gTQkda5sH K/z00HkooEyalU6tchEr+pKvXsAoQg3QTvUTD9dDKjsGmOecdRDLjZVARNEBjx+I59us qO+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=deTq7zeUED64od4fxOGcfQd1MxzcfH878U7uEsrlFg4=; b=ZStOJOiLLP+z+kYs5dDiXYxqWbWlNNIp/Dh0Eio2ZUtex5vdAFvh1obBTGIAcSVve7 fcXh38KLd++oPGhjdf0F2v+ls/ymHTKkIFfWpSlNuupzElvcP2s6eHnsGZFa6GyxGhHI vS8XJiWaMjhWjnZ8vj6xEKHx7WdibRaLq1gC7QeqSmpH1GeM1AsY7k/TOeduF0QB1Hty OVxoMEIlDrsZH+SJkDL5IMRPfjpfLb2Erxe7F56LMJK9MOr2fean1pJK9mWVGuqJO42Q kFPKns0vJcNix1t9YSrkx2PzjWn3UVyH8+9LddyMxkT6XOSJVN2/mHbl31EMMxKYG5jz N1/w== X-Gm-Message-State: APjAAAXVz/KV0a0e7Lp2jSeQWh9jakd1wRTf6BBHwn64eofHzn/jvSAW NJ5POFw5rt3nzGtRC2nuzhQ= X-Google-Smtp-Source: APXvYqxYdjnX4BHvCUfEq0FpCkyjCfLjM2UIXjMD0XX5xx0xujmqEEDZLCrX3BQp3GFe+cgqfM1B6A== X-Received: by 2002:a17:902:26b:: with SMTP id 98mr34443210plc.30.1556566118261; Mon, 29 Apr 2019 12:28:38 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id g6sm10302945pgi.70.2019.04.29.12.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 12:28:37 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: Paul Gortmaker , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 3/5] watchdog: Make watchdog core configurable as module Date: Mon, 29 Apr 2019 12:28:29 -0700 Message-Id: <1556566111-31970-3-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556566111-31970-1-git-send-email-linux@roeck-us.net> References: <1556566111-31970-1-git-send-email-linux@roeck-us.net> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Under some circumstances it may be desirable to configure the watchdog core as module. Enable it. As part of this change, mark pretimeout governors as depending on the watchdog core. This is necessary to prevent governors from being built into the kernel if the watchdog core is built as module. Signed-off-by: Guenter Roeck --- drivers/watchdog/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index ac37a14439c7..c2d6934508ee 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -30,7 +30,7 @@ menuconfig WATCHDOG if WATCHDOG config WATCHDOG_CORE - bool "WatchDog Timer Driver Core" + tristate "WatchDog Timer Driver Core" ---help--- Say Y here if you want to use the new watchdog timer driver core. This driver provides a framework for all watchdog timer drivers @@ -75,6 +75,7 @@ if WATCHDOG_PRETIMEOUT_GOV config WATCHDOG_PRETIMEOUT_GOV_NOOP tristate "Noop watchdog pretimeout governor" + depends on WATCHDOG_CORE default WATCHDOG_CORE help Noop watchdog pretimeout governor, only an informational @@ -82,6 +83,7 @@ config WATCHDOG_PRETIMEOUT_GOV_NOOP config WATCHDOG_PRETIMEOUT_GOV_PANIC tristate "Panic watchdog pretimeout governor" + depends on WATCHDOG_CORE default WATCHDOG_CORE help Panic watchdog pretimeout governor, on watchdog pretimeout From patchwork Mon Apr 29 19:28:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10922431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E126314C0 for ; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D225B28775 for ; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6A142896F; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C2FD28913 for ; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729268AbfD2T2l (ORCPT ); Mon, 29 Apr 2019 15:28:41 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43258 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbfD2T2k (ORCPT ); Mon, 29 Apr 2019 15:28:40 -0400 Received: by mail-pf1-f196.google.com with SMTP id e67so5806255pfe.10; Mon, 29 Apr 2019 12:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=zMXiwgjvtDUD1JgP0fZUvJHdTaY8BBg28l03u7zynPQ=; b=hwQR60+XW+Ex9w89lMRy4zW9zZcFcSxJn4uvM3BuMaZ5isPOc34dE8ty4bY0QIHKmE I1fT8OauHX+w5+Sr6thENSl+5HrnaY0gOzRosy0zH5DapmVKlkL6Kv3t9kXYLtCnSNwy VwX5RT2nbDKJb+e85RNe3Yi4pYbocy7SlXGCn0AvckDYIiralgKKyUY/MXb6348uUXyt WGLplWrUj/NPFjg791nHVtiP0DdV9MYP57Emu+eVDcIn+72JSw+zZT73hzij+HipTVMH h6Nhji0nZYZJBWTGWr7DGcnveCbIJbJsGEFmhJ2JMy1WYzFNdRMCnBfq2f8Fif0f6hXJ AeaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=zMXiwgjvtDUD1JgP0fZUvJHdTaY8BBg28l03u7zynPQ=; b=UOX3cBH7g9A4okpRAiTs7e5LLQb9CeAmHgjR8Z7V5tEfShydx8DfM//DQ40rxmGGfH YCEN/eKXBRyzQWgNguuwoQx1h35Xh2wlvJ7YsNLgUiVhYPLD6gzM2RyToVjqAA9U55zH re0TQtTOJPBxhrX/lBAH+G0a0azgpQUrWrO5MIRPdjJmRFz/eTXt7YAHIqbf/7gRYLxp deaPNiUZF0dkeSErbW1LwGH7McIhVJBXx2oDZg+Tq6G2D+NEIoJR7j6cSKLPBkfnaVBz ZgloBCtovn3iNpN3BAuCUwkO+B8VhZI2W92jaHJXepsMdpkyn40ROtujj4hjbWnlYlKj WLTg== X-Gm-Message-State: APjAAAUEzaEXZofoBrrfhlp+1CGhVhAY/Wibs9aQqtIN61rJiBfetWl1 BmnCXx9ogYZga32JsejrDzM= X-Google-Smtp-Source: APXvYqxjaUGeoKNm81722Fq7OOemlAEQb7+hjGDhjjlBWDPhCp5DnhOspN2+rtc6xDMG1Uq9UXeV9g== X-Received: by 2002:a63:c54a:: with SMTP id g10mr37236700pgd.71.1556566119630; Mon, 29 Apr 2019 12:28:39 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j20sm48495447pfn.84.2019.04.29.12.28.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 12:28:39 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: Paul Gortmaker , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 4/5] watchdog: npcm: Enable modular builds Date: Mon, 29 Apr 2019 12:28:30 -0700 Message-Id: <1556566111-31970-4-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556566111-31970-1-git-send-email-linux@roeck-us.net> References: <1556566111-31970-1-git-send-email-linux@roeck-us.net> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most of the NPCM7XX drivers can be built as modules. The NPCM7XX watchdog driver code supports building it as module, but its configuration option is set to bool. Make itr tristate to actually support modular builds. This improves consistency with other drivers for the same platform and enables including the driver in multi- platform configurations. Signed-off-by: Guenter Roeck --- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index c2d6934508ee..e5b30c4947d7 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -618,7 +618,7 @@ config COH901327_WATCHDOG compiled as a module. config NPCM7XX_WATCHDOG - bool "Nuvoton NPCM750 watchdog" + tristate "Nuvoton NPCM750 watchdog" depends on ARCH_NPCM || COMPILE_TEST default y if ARCH_NPCM7XX select WATCHDOG_CORE From patchwork Mon Apr 29 19:28:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10922429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F50A14C0 for ; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20AFD28715 for ; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14D87288AA; Mon, 29 Apr 2019 19:28:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A929228715 for ; Mon, 29 Apr 2019 19:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729280AbfD2T2m (ORCPT ); Mon, 29 Apr 2019 15:28:42 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45666 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729188AbfD2T2m (ORCPT ); Mon, 29 Apr 2019 15:28:42 -0400 Received: by mail-pf1-f196.google.com with SMTP id e24so5807151pfi.12; Mon, 29 Apr 2019 12:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=o/V5fcdJjHEEGhSr+L86I9P3xGJAwwcDCT1sez3UiKw=; b=nPu/PKPFoX/38S1YWGpLVmvQoEwJC1O4gPJeWphYcE7+DFCKUfTYc/NBkutehamSYl mRwpDB4MoyGKDNREQURyD+bx/dibN/Yex6UmJlp6Gtbyki2fWshJq6kM6nyB47K8FJ7X fcda8RDnbnLVMI7EPUCMGljbyU4jXfLSGObTDIS9QpRlEQwL2FXckAGnnbseXnsEBCJD oCxGeU12npDMpfgMJP6nWzusABFo9Mlmm5ec284I/94dgkq34/VoXU7nSP/1iTId3RM+ KFoIgsa3W0QMBLdLveyrRADeuOe/YdrYPP7s0QH5O+GqhjsvFWwUVHlVwndTG7Sa5g1U bpig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=o/V5fcdJjHEEGhSr+L86I9P3xGJAwwcDCT1sez3UiKw=; b=UVkB40GNaxOusMQvUBx+gN7nJjZeMrXd3v1ao+i1Xer6BldZ8402tb676BfzpTizkE yJAXAQ42ge5cTxJMz9DUXCearI2QLDBOI+Kj08Cxz+bkI8NyW1dsJT7rI1egdnx00Oea rV3u92+aOAeEX4AFoE/Z2RwBy7JmZyNvLC8bv7vFkRI5j3q+ut9UoFuhy8yHs1sedPIU L1yxkF4ikhgaxNpLGRPm81WnGu1I29R+nv6KwLG3OF/3FnLvvESJJDsBC7VeMWtQ0QLd UVcY1HEhPJVy23fUpD1OV2Q4YPZXoS3VkPWzmZjLICKCuCgZn0ZoEFZw3RdExH3g6eSk jIEQ== X-Gm-Message-State: APjAAAWcbZlszINMbpidn+prsG4dDu9w9Yoq67FBroPh+05gm3BiZcsI 7+0UXCKiELhykpoc+I9dxmM= X-Google-Smtp-Source: APXvYqyDtDtNh2iUnupV7AxXjhggYBZjnzLIl3wltJ3lU9zLmxLNJ2BNEW2EYpwoyIgQzhPW3oIBrA== X-Received: by 2002:a65:5687:: with SMTP id v7mr19072678pgs.299.1556566121015; Mon, 29 Apr 2019 12:28:41 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j20sm48495489pfn.84.2019.04.29.12.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 12:28:40 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: Paul Gortmaker , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 5/5] watchdog: Improve Kconfig entry ordering and dependencies Date: Mon, 29 Apr 2019 12:28:31 -0700 Message-Id: <1556566111-31970-5-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556566111-31970-1-git-send-email-linux@roeck-us.net> References: <1556566111-31970-1-git-send-email-linux@roeck-us.net> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HPWDT_NMI_DECODING depends on HP_WATCHDOG and should be next to it. This helps menuconfig identify HPWDT_NMI_DECODING as depending on HP_WATCHDOG. BCM_KONA_WDT_DEBUG depends on BCM_KONA_WDT which depends on COMPILE_TEST. Enabling BCM_KONA_WDT_DEBUG without BCM_KONA_WDT does not make sense, so drop the COMPILE_TEST dependency from it. This also improves menuconfig, which now properly associates BCM_KONA_WDT_DEBUG with BCM_KONA_WDT. Signed-off-by: Guenter Roeck --- drivers/watchdog/Kconfig | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index e5b30c4947d7..f457992487ea 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -1261,6 +1261,15 @@ config HP_WATCHDOG To compile this driver as a module, choose M here: the module will be called hpwdt. +config HPWDT_NMI_DECODING + bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer" + depends on HP_WATCHDOG + default y + help + Enables the NMI handler for the watchdog pretimeout NMI and the iLO + "Generate NMI to System" virtual button. When an NMI is claimed + by the driver, panic is called. + config KEMPLD_WDT tristate "Kontron COM Watchdog Timer" depends on MFD_KEMPLD @@ -1272,15 +1281,6 @@ config KEMPLD_WDT This driver can also be built as a module. If so, the module will be called kempld_wdt. -config HPWDT_NMI_DECODING - bool "NMI support for the HP ProLiant iLO2+ Hardware Watchdog Timer" - depends on HP_WATCHDOG - default y - help - Enables the NMI handler for the watchdog pretimeout NMI and the iLO - "Generate NMI to System" virtual button. When an NMI is claimed - by the driver, panic is called. - config SC1200_WDT tristate "National Semiconductor PC87307/PC97307 (ala SC1200) Watchdog" depends on X86 @@ -1729,7 +1729,7 @@ config BCM_KONA_WDT config BCM_KONA_WDT_DEBUG bool "DEBUGFS support for BCM Kona Watchdog" - depends on BCM_KONA_WDT || COMPILE_TEST + depends on BCM_KONA_WDT help If enabled, adds /sys/kernel/debug/bcm_kona_wdt/info which provides access to the driver's internal data structures as well as watchdog