From 040535b79345968fd0fd8c57ef8c3ce8eba61c46 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Thu, 8 May 2014 14:06:38 +0530 Subject: [PATCH] ARC: arc_local_timer_setup() need not pass own cpu id Signed-off-by: Vineet Gupta --- arch/arc/include/asm/irq.h | 2 +- arch/arc/kernel/smp.c | 2 +- arch/arc/kernel/time.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h index 6b7aaab534de..cce6be7a6c11 100644 --- a/arch/arc/include/asm/irq.h +++ b/arch/arc/include/asm/irq.h @@ -20,7 +20,7 @@ #include extern void arc_init_IRQ(void); -void arc_local_timer_setup(unsigned int cpu); +void arc_local_timer_setup(void); void arc_request_percpu_irq(int irq, int cpu, irqreturn_t (*hldr)(int irq, void *dev), const char *irq_nm, void *percpu_dev); diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index 2ef73a479975..9ab96ae7c2a9 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c @@ -138,7 +138,7 @@ void start_kernel_secondary(void) if (machine_desc->init_smp) machine_desc->init_smp(smp_processor_id()); - arc_local_timer_setup(cpu); + arc_local_timer_setup(); local_irq_enable(); preempt_disable(); diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index 519055335769..4913921c20db 100644 --- a/arch/arc/kernel/time.c +++ b/arch/arc/kernel/time.c @@ -213,9 +213,10 @@ static irqreturn_t timer_irq_handler(int irq, void *dev_id) /* * Setup the local event timer for @cpu */ -void arc_local_timer_setup(unsigned int cpu) +void arc_local_timer_setup() { - struct clock_event_device *evt = per_cpu_ptr(&arc_clockevent_device, cpu); + struct clock_event_device *evt = this_cpu_ptr(&arc_clockevent_device); + int cpu = smp_processor_id(); evt->cpumask = cpumask_of(cpu); clockevents_config_and_register(evt, arc_get_core_freq(), @@ -248,7 +249,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(); -- 2.39.5