xref: /linux/arch/loongarch/include/asm/paravirt.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
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 
22 #else
23 
24 static inline int pv_ipi_init(void)
25 {
26 	return 0;
27 }
28 
29 #endif // CONFIG_PARAVIRT
30 #endif
31