Skip to content

Commit 65e0f87

Browse files
fancerdlezcano
authored andcommitted
clocksource: dw_apb_timer: Affiliate of-based timer with any CPU
Currently any DW APB Timer device detected in OF is bound to CPU #0. Doing so is redundant since DW APB Timer isn't CPU-local timer, but as having APB interface is normally accessible from any CPU in the system. By artificially affiliating the DW timer to the very first CPU we may and in our case will make the clockevent subsystem to decline the more performant real CPU-local timers selection in favor of in fact non-local and accessible over a slow bus - DW APB Timers. Let's not affiliate the of-detected DW APB Timers to any CPU. By doing so the clockevent framework would prefer to select the real CPU-local timer instead of DW APB one. Otherwise if there is no other than DW APB device for clockevents tracking then it will be selected. Signed-off-by: Serge Semin <[email protected]> Cc: Alexey Malahov <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cee43db commit 65e0f87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clocksource/dw_apb_timer_of.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static void __init add_clockevent(struct device_node *event_timer)
7373

7474
timer_get_base_and_rate(event_timer, &iobase, &rate);
7575

76-
ced = dw_apb_clockevent_init(0, event_timer->name, 300, iobase, irq,
76+
ced = dw_apb_clockevent_init(-1, event_timer->name, 300, iobase, irq,
7777
rate);
7878
if (!ced)
7979
panic("Unable to initialise clockevent device");

0 commit comments

Comments
 (0)