summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/time.c
diff options
context:
space:
mode:
authorVineet Gupta2014-05-08 10:36:38 +0200
committerVineet Gupta2014-06-03 09:56:52 +0200
commit2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369 (patch)
treec4e0633d2a0b9b3abd6a2948fd11f9bbeb4041d4 /arch/arc/kernel/time.c
parentARC: Fixed spelling errors within comments (diff)
downloadkernel-qcow2-linux-2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369.tar.gz
kernel-qcow2-linux-2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369.tar.xz
kernel-qcow2-linux-2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369.zip
ARC: arc_local_timer_setup() need not pass own cpu id
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/time.c')
-rw-r--r--arch/arc/kernel/time.c11
1 files changed, 6 insertions, 5 deletions
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 = {
/*
* Setup the local event timer for @cpu
*/
-void arc_local_timer_setup(unsigned int cpu)
+void arc_local_timer_setup()
{
- struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu);
+ struct clock_event_device *evt = this_cpu_ptr(&arc_clockevent_device);
+ int cpu = smp_processor_id();
- clk->cpumask = cpumask_of(cpu);
- clockevents_config_and_register(clk, arc_get_core_freq(),
+ evt->cpumask = cpumask_of(cpu);
+ clockevents_config_and_register(evt, arc_get_core_freq(),
0, ARC_TIMER_MAX);
/*
@@ -261,7 +262,7 @@ void __init time_init(void)
clocksource_register_hz(&arc_counter, arc_get_core_freq());
/* sets up the periodic event timer */
- arc_local_timer_setup(smp_processor_id());
+ arc_local_timer_setup();
if (machine_desc->init_time)
machine_desc->init_time();