xref: /linux/arch/loongarch/include/asm/paravirt.h (revision d53b8e36925256097a08d7cb749198d85cbf9b2b)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_LOONGARCH_PARAVIRT_H
3 #define _ASM_LOONGARCH_PARAVIRT_H
4 
5 #ifdef CONFIG_PARAVIRT
6 
7 #include <linux/static_call_types.h>
8 struct static_key;
9 extern struct static_key paravirt_steal_enabled;
10 extern struct static_key paravirt_steal_rq_enabled;
11 
12 u64 dummy_steal_clock(int cpu);
13 DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
14 
15 static inline u64 paravirt_steal_clock(int cpu)
16 {
17 	return static_call(pv_steal_clock)(cpu);
18 }
19 
20 int __init pv_ipi_init(void);
21 int __init pv_time_init(void);
22 
23 #else
24 
25 static inline int pv_ipi_init(void)
26 {
27 	return 0;
28 }
29 
30 static inline int pv_time_init(void)
31 {
32 	return 0;
33 }
34 #endif // CONFIG_PARAVIRT
35 #endif
36