OSDN Git Service

openrisc: add tick timer multi-core sync logic
authorStafford Horne <shorne@gmail.com>
Thu, 6 Jul 2017 21:06:30 +0000 (06:06 +0900)
committerStafford Horne <shorne@gmail.com>
Fri, 3 Nov 2017 05:01:16 +0000 (14:01 +0900)
commit4553474d977d1ee8a81067cfbc588f1df84ce3e9
tree4e74260eb9134fd94a7bc20fc3ab23e4ecb3a7e1
parent78cdfb5cf15e0f9fb4c2a9176a13a907a1d024f0
openrisc: add tick timer multi-core sync logic

In case timers are not in sync when cpus start (i.e. hot plug / offset
resets) we need to synchronize the secondary cpus internal timer with
the main cpu.  This is needed as in OpenRISC SMP there is only one
clocksource registered which reads from the same ttcr register on each
cpu.

This synchronization routine heavily borrows from mips implementation that
does something similar.

Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/time.h
arch/openrisc/kernel/Makefile
arch/openrisc/kernel/smp.c
arch/openrisc/kernel/sync-timer.c [new file with mode: 0644]
arch/openrisc/kernel/time.c