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


Groups > linux.kernel > #1234441 > unrolled thread

[PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef

Started byUlrich Obergfell <uobergfe@redhat.com>
First post2015-09-28 22:50 +0200
Last post2015-09-30 01:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef Ulrich Obergfell <uobergfe@redhat.com> - 2015-09-28 22:50 +0200
    Re: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside  of ifdef Aaron Tomlin <atomlin@redhat.com> - 2015-09-29 08:50 +0200
    Re: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside  of ifdef Andrew Morton <akpm@linux-foundation.org> - 2015-09-30 01:40 +0200

#1234441 — [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef

FromUlrich Obergfell <uobergfe@redhat.com>
Date2015-09-28 22:50 +0200
Subject[PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef
Message-ID<qdNx1-23T-35@gated-at.bofh.it>
It makes sense to place watchdog_{dis|enable}_all_cpus() outside of
the ifdef so that _both_ are available even if CONFIG_SYSCTL is not
defined.

Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
---
 kernel/watchdog.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index cd9a504..eb9527c 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -347,6 +347,9 @@ static void watchdog_interrupt_count(void)
 static int watchdog_nmi_enable(unsigned int cpu);
 static void watchdog_nmi_disable(unsigned int cpu);
 
+static int watchdog_enable_all_cpus(void);
+static void watchdog_disable_all_cpus(void);
+
 /* watchdog kicker functions */
 static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
 {
@@ -756,9 +759,6 @@ static int watchdog_enable_all_cpus(void)
 	return err;
 }
 
-/* prepare/enable/disable routines */
-/* sysctl functions */
-#ifdef CONFIG_SYSCTL
 static void watchdog_disable_all_cpus(void)
 {
 	if (watchdog_running) {
@@ -767,6 +767,8 @@ static void watchdog_disable_all_cpus(void)
 	}
 }
 
+#ifdef CONFIG_SYSCTL
+
 /*
  * Update the run state of the lockup detectors.
  */
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1234749 — Re: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef

FromAaron Tomlin <atomlin@redhat.com>
Date2015-09-29 08:50 +0200
SubjectRe: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef
Message-ID<qdWTE-792-13@gated-at.bofh.it>
In reply to#1234441

[Multipart message — attachments visible in raw view] — view raw

On Mon 2015-09-28 22:44 +0200, Ulrich Obergfell wrote:
> It makes sense to place watchdog_{dis|enable}_all_cpus() outside of
> the ifdef so that _both_ are available even if CONFIG_SYSCTL is not
> defined.
> 
> Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
> ---
>  kernel/watchdog.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index cd9a504..eb9527c 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -347,6 +347,9 @@ static void watchdog_interrupt_count(void)
>  static int watchdog_nmi_enable(unsigned int cpu);
>  static void watchdog_nmi_disable(unsigned int cpu);
>  
> +static int watchdog_enable_all_cpus(void);
> +static void watchdog_disable_all_cpus(void);
> +
>  /* watchdog kicker functions */
>  static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
>  {
> @@ -756,9 +759,6 @@ static int watchdog_enable_all_cpus(void)
>  	return err;
>  }
>  
> -/* prepare/enable/disable routines */
> -/* sysctl functions */
> -#ifdef CONFIG_SYSCTL
>  static void watchdog_disable_all_cpus(void)
>  {
>  	if (watchdog_running) {
> @@ -767,6 +767,8 @@ static void watchdog_disable_all_cpus(void)
>  	}
>  }
>  
> +#ifdef CONFIG_SYSCTL
> +
>  /*
>   * Update the run state of the lockup detectors.
>   */

Reviewed-by: Aaron Tomlin <atomlin@redhat.com>

[toc] | [prev] | [next] | [standalone]


#1235633 — Re: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef

FromAndrew Morton <akpm@linux-foundation.org>
Date2015-09-30 01:40 +0200
SubjectRe: [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef
Message-ID<qecF3-4pC-1@gated-at.bofh.it>
In reply to#1234441
On Mon, 28 Sep 2015 22:44:09 +0200 Ulrich Obergfell <uobergfe@redhat.com> wrote:

> It makes sense to place watchdog_{dis|enable}_all_cpus() outside of
> the ifdef so that _both_ are available even if CONFIG_SYSCTL is not
> defined.

Not really.  With CONFIG_SYSCTL=n this change will cause a compile
warning and will bloat up vmlinux.

I'll rewrite the changelog to

: Move watchdog_disable_all_cpus() outside of the ifdef so that it is
: available if CONFIG_SYSCTL is not defined.  This is preparation for
: "watchdog: implement error handling in update_watchdog_all_cpus() and
: callers".


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web