Skip to content

Commit

Permalink
ARC: arc_local_timer_setup() need not pass own cpu id
Browse files Browse the repository at this point in the history
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Jun 3, 2014
1 parent f63f98e commit 2d4899f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
#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);

#endif
2 changes: 1 addition & 1 deletion arch/arc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
11 changes: 6 additions & 5 deletions arch/arc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2d4899f

Please sign in to comment.