Skip to content

Commit 2d4899f

Browse files
committed
ARC: arc_local_timer_setup() need not pass own cpu id
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent f63f98e commit 2d4899f

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎arch/arc/include/asm/irq.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
#include <asm-generic/irq.h>
2020

2121
extern void arc_init_IRQ(void);
22-
void arc_local_timer_setup(unsigned int cpu);
22+
void arc_local_timer_setup(void);
2323

2424
#endif

‎arch/arc/kernel/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void start_kernel_secondary(void)
138138
if (machine_desc->init_smp)
139139
machine_desc->init_smp(smp_processor_id());
140140

141-
arc_local_timer_setup(cpu);
141+
arc_local_timer_setup();
142142

143143
local_irq_enable();
144144
preempt_disable();

‎arch/arc/kernel/time.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,13 @@ static struct irqaction arc_timer_irq = {
219219
/*
220220
* Setup the local event timer for @cpu
221221
*/
222-
void arc_local_timer_setup(unsigned int cpu)
222+
void arc_local_timer_setup()
223223
{
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();
225226

226-
clk->cpumask = cpumask_of(cpu);
227-
clockevents_config_and_register(clk, arc_get_core_freq(),
227+
evt->cpumask = cpumask_of(cpu);
228+
clockevents_config_and_register(evt, arc_get_core_freq(),
228229
0, ARC_TIMER_MAX);
229230

230231
/*
@@ -261,7 +262,7 @@ void __init time_init(void)
261262
clocksource_register_hz(&arc_counter, arc_get_core_freq());
262263

263264
/* sets up the periodic event timer */
264-
arc_local_timer_setup(smp_processor_id());
265+
arc_local_timer_setup();
265266

266267
if (machine_desc->init_time)
267268
machine_desc->init_time();

0 commit comments

Comments
 (0)