Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225895
b: refs/heads/master
c: 10034aa
h: refs/heads/master
i:
  225893: a8c70d7
  225891: 26c06a6
  225887: e5b463e
v: v3
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent 2888b0c commit 42fb3bd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3d9c625f5e4158014e041f492b46e38ad10987e
refs/heads/master: 10034aabca9032246762daaca3152f3e79380ea0
12 changes: 0 additions & 12 deletions trunk/arch/arm/include/asm/localtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ asmlinkage void do_local_timer(struct pt_regs *);
#include "smp_twd.h"

#define local_timer_ack() twd_timer_ack()
#define local_timer_stop() twd_timer_stop()

#else

Expand All @@ -40,24 +39,13 @@ asmlinkage void do_local_timer(struct pt_regs *);
*/
int local_timer_ack(void);

/*
* Stop a local timer interrupt.
*/
void local_timer_stop(void);

#endif

/*
* Setup a local timer interrupt for a CPU.
*/
void local_timer_setup(struct clock_event_device *);

#else

static inline void local_timer_stop(void)
{
}

#endif

#endif
1 change: 0 additions & 1 deletion trunk/arch/arm/include/asm/smp_twd.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ struct clock_event_device;

extern void __iomem *twd_base;

void twd_timer_stop(void);
int twd_timer_ack(void);
void twd_timer_setup(struct clock_event_device *);

Expand Down
19 changes: 18 additions & 1 deletion trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
}

#ifdef CONFIG_HOTPLUG_CPU
static void percpu_timer_stop(void);

/*
* __cpu_disable runs on the processor to be shutdown.
*/
Expand Down Expand Up @@ -216,7 +218,7 @@ int __cpu_disable(void)
/*
* Stop the local timer for this CPU.
*/
local_timer_stop();
percpu_timer_stop();

/*
* Flush user cache and TLB mappings, and then remove this CPU
Expand Down Expand Up @@ -539,6 +541,21 @@ void __cpuinit percpu_timer_setup(void)
local_timer_setup(evt);
}

#ifdef CONFIG_HOTPLUG_CPU
/*
* The generic clock events code purposely does not stop the local timer
* on CPU_DEAD/CPU_DEAD_FROZEN hotplug events, so we have to do it
* manually here.
*/
static void percpu_timer_stop(void)
{
unsigned int cpu = smp_processor_id();
struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);

evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
}
#endif

static DEFINE_SPINLOCK(stop_lock);

/*
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/arm/kernel/smp_twd.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,3 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)

clockevents_register_device(clk);
}

#ifdef CONFIG_HOTPLUG_CPU
/*
* take a local timer down
*/
void twd_timer_stop(void)
{
__raw_writel(0, twd_base + TWD_TIMER_CONTROL);
}
#endif

0 comments on commit 42fb3bd

Please sign in to comment.