lkml.org 
[lkml]   [2014]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] clocksource: register cpu notifier to remove timer from dying CPU
From
On 5 April 2014 17:33, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> kernel/time/clocksource.c | 64 +++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 53 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index ba3e502..8054fb1 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -23,16 +23,21 @@
> * o Allow clocksource drivers to be unregistered
> */
>
> +#include <linux/cpu.h>
> #include <linux/device.h>
> #include <linux/clocksource.h>
> #include <linux/init.h>
> #include <linux/module.h>
> +#include <linux/notifier.h>
> #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
> #include <linux/tick.h>
> #include <linux/kthread.h>
>
> #include "tick-internal.h"
>
> +/* Tracks current CPU to queue watchdog timer on */
> +static int timer_cpu;
> +

Minor fixup, will send V2 after few days:

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 8054fb1..356c6c6 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -35,9 +35,6 @@

#include "tick-internal.h"

-/* Tracks current CPU to queue watchdog timer on */
-static int timer_cpu;
-
void timecounter_init(struct timecounter *tc,
const struct cyclecounter *cc,
u64 start_tstamp)
@@ -185,6 +182,9 @@ static char override_name[CS_NAME_LEN];
static int finished_booting;

#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
+/* Tracks current CPU to queue watchdog timer on */
+static int timer_cpu;
+
static void clocksource_watchdog_work(struct work_struct *work);
static void clocksource_select(void);

\
 
 \ /
  Last update: 2014-04-08 07:41    [W:0.037 / U:32.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site