mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 23:47:39 +07:00
4553474d97
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>
24 lines
627 B
C
24 lines
627 B
C
/*
|
|
* OpenRISC timer API
|
|
*
|
|
* Copyright (C) 2017 by Stafford Horne (shorne@gmail.com)
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*/
|
|
#ifndef __ASM_OR1K_TIME_H
|
|
#define __ASM_OR1K_TIME_H
|
|
|
|
extern void openrisc_clockevent_init(void);
|
|
|
|
extern void openrisc_timer_set(unsigned long count);
|
|
extern void openrisc_timer_set_next(unsigned long delta);
|
|
|
|
#ifdef CONFIG_SMP
|
|
extern void synchronise_count_master(int cpu);
|
|
extern void synchronise_count_slave(int cpu);
|
|
#endif
|
|
|
|
#endif /* __ASM_OR1K_TIME_H */
|