From: Babu Moger <babu.moger@oracle.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: mingo@kernel.org, akpm@linux-foundation.org, ak@linux.intel.com,
jkosina@suse.cz, baiyaowei@cmss.chinamobile.com,
dzickus@redhat.com, atomlin@redhat.com, uobergfe@redhat.com,
tj@kernel.org, hidehiro.kawai.ez@hitachi.com, johunt@akamai.com,
davem@davemloft.net, sparclinux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: Introduce update_arch_nmi_watchdog
Date: Fri, 7 Oct 2016 09:54:16 -0500 [thread overview]
Message-ID: <8ea9198e-1407-12ba-2909-ded6e8ec5eb0@oracle.com> (raw)
In-Reply-To: <20161007043423.GA7263@ravnborg.org>
On 10/6/2016 11:34 PM, Sam Ravnborg wrote:
> On Thu, Oct 06, 2016 at 03:16:42PM -0700, Babu Moger wrote:
>> Currently we do not have a way to enable/disable arch specific
>> watchdog handlers if it was implemented by any of the architectures.
>>
>> This patch introduces new function update_arch_nmi_watchdog
>> which can be used to enable/disable architecture specific NMI
>> watchdog handlers. Also exposes watchdog_enabled variable outside
>> so that arch specific nmi watchdogs can use it to implement
>> enalbe/disable behavour.
>>
>> Signed-off-by: Babu Moger <babu.moger@oracle.com>
>> ---
>> include/linux/nmi.h | 1 +
>> kernel/watchdog.c | 16 +++++++++++++---
>> 2 files changed, 14 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/nmi.h b/include/linux/nmi.h
>> index 4630eea..01b4830 100644
>> --- a/include/linux/nmi.h
>> +++ b/include/linux/nmi.h
>> @@ -66,6 +66,7 @@ static inline bool trigger_allbutself_cpu_backtrace(void)
>>
>> #ifdef CONFIG_LOCKUP_DETECTOR
>> u64 hw_nmi_get_sample_period(int watchdog_thresh);
>> +extern unsigned long watchdog_enabled;
> The extern is within an #ifdef, but the definition later is
> valid alway.
> So extern definition should be outside the #ifdef to match the
> actual implementation.
Ok. Sure.
>
> To manipulate / read watchdog_enabled two constants are used:
> NMI_WATCHDOG_ENABLED, SOFT_WATCHDOG_ENABLED
Sure. I will bring these definitions to nmi.h from watchdog.c
> They should be visible too, so uses do not fall into the trap
> and uses constants (like in patch 2).
Will re-post v2 version with these changes. Thanks for the comments.
>
> Sam
next prev parent reply other threads:[~2016-10-07 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 22:16 [PATCH 0/2] Introduce update_arch_nmi_watchdog for arch specific handlers Babu Moger
2016-10-06 22:16 ` [PATCH 1/2] watchdog: Introduce update_arch_nmi_watchdog Babu Moger
2016-10-07 4:34 ` Sam Ravnborg
2016-10-07 14:54 ` Babu Moger [this message]
2016-10-06 22:16 ` [PATCH 2/2] sparc: Implement update_arch_nmi_watchdog Babu Moger
2016-10-07 15:51 ` [PATCH 0/2] Introduce update_arch_nmi_watchdog for arch specific handlers Don Zickus
2016-10-13 20:37 ` Babu Moger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ea9198e-1407-12ba-2909-ded6e8ec5eb0@oracle.com \
--to=babu.moger@oracle.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=baiyaowei@cmss.chinamobile.com \
--cc=davem@davemloft.net \
--cc=dzickus@redhat.com \
--cc=hidehiro.kawai.ez@hitachi.com \
--cc=jkosina@suse.cz \
--cc=johunt@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=tj@kernel.org \
--cc=uobergfe@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®