Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1667995

Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()
Date 2017-06-16 20:30 +0200
Message-ID <tT4an-3MU-31@gated-at.bofh.it> (permalink)
References <tSToB-4Ym-11@gated-at.bofh.it> <tSToC-4Ym-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 16 Jun 2017 16:57:12 +1000 Nicholas Piggin <npiggin@gmail.com> wrote:

> For architectures that define HAVE_NMI_WATCHDOG, instead of having
> them provide the complete touch_nmi_watchdog() function, just have
> them provide arch_touch_nmi_watchdog().
> 
> This gives the generic code more flexibility in implementing this
> function, and arch implementations don't miss out on touching the
> softlockup watchdog or other generic details.
> 
> ...
>
> --- a/arch/blackfin/include/asm/nmi.h
> +++ b/arch/blackfin/include/asm/nmi.h
> @@ -9,4 +9,6 @@
>  
>  #include <linux/nmi.h>
>  
> +extern void arch_touch_nmi_watchdog(void);

Do we actually need to add this to the arch header files...

>
> ...
>
> --- a/include/linux/nmi.h
> +++ b/include/linux/nmi.h
> @@ -6,6 +6,9 @@
>  
>  #include <linux/sched.h>
>  #include <asm/irq.h>
> +#if defined(CONFIG_HAVE_NMI_WATCHDOG)
> +#include <asm/nmi.h>
> +#endif
>  
>  #ifdef CONFIG_LOCKUP_DETECTOR
>  extern void touch_softlockup_watchdog_sched(void);
> @@ -58,6 +61,18 @@ static inline void reset_hung_task_detector(void)
>  #define NMI_WATCHDOG_ENABLED      (1 << NMI_WATCHDOG_ENABLED_BIT)
>  #define SOFT_WATCHDOG_ENABLED     (1 << SOFT_WATCHDOG_ENABLED_BIT)
>  
> +#if defined(CONFIG_HARDLOCKUP_DETECTOR)
> +extern void hardlockup_detector_disable(void);
> +#else
> +static inline void hardlockup_detector_disable(void) {}
> +#endif
> +
> +#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG)
> +extern void arch_touch_nmi_watchdog(void);
> +#else
> +static inline void arch_touch_nmi_watchdog(void) {}
> +#endif
> +

given that we have a global declaration here?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/5] Improve watchdog config for arch watchdogs Nicholas Piggin <npiggin@gmail.com> - 2017-06-16 09:00 +0200
  [PATCH v4 5/5] powerpc/64s: implement arch-specific hardlockup watchdog Nicholas Piggin <npiggin@gmail.com> - 2017-06-16 09:00 +0200
  [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog() Nicholas Piggin <npiggin@gmail.com> - 2017-06-16 09:00 +0200
    Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog() Andrew Morton <akpm@linux-foundation.org> - 2017-06-16 20:30 +0200
      Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog() Nicholas Piggin <npiggin@gmail.com> - 2017-06-17 04:50 +0200
  [PATCH v4 3/5] watchdog: split up config options Nicholas Piggin <npiggin@gmail.com> - 2017-06-16 09:00 +0200
    Re: [PATCH v4 3/5] watchdog: split up config options Nicholas Piggin <npiggin@gmail.com> - 2017-06-17 14:40 +0200
  Re: [PATCH v4 0/5] Improve watchdog config for arch watchdogs Don Zickus <dzickus@redhat.com> - 2017-06-16 17:00 +0200
    Re: [PATCH v4 0/5] Improve watchdog config for arch watchdogs Babu Moger <babu.moger@oracle.com> - 2017-06-16 19:20 +0200

csiph-web