aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-05-08 04:36:38 -0400
committerVineet Gupta <vgupta@synopsys.com>2014-06-03 03:56:52 -0400
commit2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369 (patch)
treec4e0633d2a0b9b3abd6a2948fd11f9bbeb4041d4 /arch/arc
parentf63f98ea253c493a514b5f5748480336ad1d9dbf (diff)
ARC: arc_local_timer_setup() need not pass own cpu id
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/irq.h2
-rw-r--r--arch/arc/kernel/smp.c2
-rw-r--r--arch/arc/kernel/time.c11
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h
index 781f57f25bd8..fb4efb648971 100644
--- a/arch/arc/include/asm/irq.h
+++ b/arch/arc/include/asm/irq.h
@@ -19,6 +19,6 @@
19#include <asm-generic/irq.h> 19#include <asm-generic/irq.h>
20 20
21extern void arc_init_IRQ(void); 21extern void arc_init_IRQ(void);
22void arc_local_timer_setup(unsigned int cpu); 22void arc_local_timer_setup(void);
23 23
24#endif 24#endif
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 40859e5619f9..cf90b6f4d3e0 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -138,7 +138,7 @@ void start_kernel_secondary(void)
138 if (machine_desc->init_smp) 138 if (machine_desc->init_smp)
139 machine_desc->init_smp(smp_processor_id()); 139 machine_desc->init_smp(smp_processor_id());
140 140
141 arc_local_timer_setup(cpu); 141 arc_local_timer_setup();
142 142
143 local_irq_enable(); 143 local_irq_enable();
144 preempt_disable(); 144 preempt_disable();
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c
index 71c42521c77f..36c2aa99436f 100644
--- a/arch/arc/kernel/time.c
+++ b/arch/arc/kernel/time.c
@@ -219,12 +219,13 @@ static struct irqaction arc_timer_irq = {
219/* 219/*
220 * Setup the local event timer for @cpu 220 * Setup the local event timer for @cpu
221 */ 221 */
222void arc_local_timer_setup(unsigned int cpu) 222void arc_local_timer_setup()
223{ 223{
224 struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu); 224 struct clock_event_device *evt = this_cpu_ptr(&arc_clockevent_device);
225 int cpu = smp_processor_id();
225 226
226 clk->cpumask = cpumask_of(cpu); 227 evt->cpumask = cpumask_of(cpu);
227 clockevents_config_and_register(clk, arc_get_core_freq(), 228 clockevents_config_and_register(evt, arc_get_core_freq(),
228 0, ARC_TIMER_MAX); 229 0, ARC_TIMER_MAX);
229 230
230 /* 231 /*
@@ -261,7 +262,7 @@ void __init time_init(void)
261 clocksource_register_hz(&arc_counter, arc_get_core_freq()); 262 clocksource_register_hz(&arc_counter, arc_get_core_freq());
262 263
263 /* sets up the periodic event timer */ 264 /* sets up the periodic event timer */
264 arc_local_timer_setup(smp_processor_id()); 265 arc_local_timer_setup();
265 266
266 if (machine_desc->init_time) 267 if (machine_desc->init_time)
267 machine_desc->init_time(); 268 machine_desc->init_time();