]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARC: arc_local_timer_setup() need not pass own cpu id
authorVineet Gupta <vgupta@synopsys.com>
Thu, 8 May 2014 08:36:38 +0000 (14:06 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 9 May 2014 07:34:10 +0000 (13:04 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/irq.h
arch/arc/kernel/smp.c
arch/arc/kernel/time.c

index 6b7aaab534de04e0199a9384806c3643e6e51a0e..cce6be7a6c114b95ae979b8efeb35a1a80eb70bd 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm-generic/irq.h>
 
 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);
index 2ef73a479975decc1ebb5cd044f3c51e0c39b109..9ab96ae7c2a9be917178dbd985dff53113c095fb 100644 (file)
@@ -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();
index 5190553357694220cc7f25bfc9acb29a7de6d95d..4913921c20dbc09d581d5ff48fb784e3516f30f0 100644 (file)
@@ -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();