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 paravirt_steal_clock(int cpu)15static 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 int __init pv_spinlock_init(void); 23 24 #else 25 pv_ipi_init(void)26static inline int pv_ipi_init(void) 27 { 28 return 0; 29 } 30 pv_time_init(void)31static inline int pv_time_init(void) 32 { 33 return 0; 34 } 35 pv_spinlock_init(void)36static inline int pv_spinlock_init(void) 37 { 38 return 0; 39 } 40 41 #endif // CONFIG_PARAVIRT 42 #endif 43