1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SCHED_NOHZ_H
3 #define _LINUX_SCHED_NOHZ_H
4 
5 /*
6  * This is the interface between the scheduler and nohz/dynticks:
7  */
8 
9 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
10 extern void cpu_load_update_nohz_start(void);
11 extern void cpu_load_update_nohz_stop(void);
12 #else
cpu_load_update_nohz_start(void)13 static inline void cpu_load_update_nohz_start(void) { }
cpu_load_update_nohz_stop(void)14 static inline void cpu_load_update_nohz_stop(void) { }
15 #endif
16 
17 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
18 extern void nohz_balance_enter_idle(int cpu);
19 extern int get_nohz_timer_target(void);
20 #else
nohz_balance_enter_idle(int cpu)21 static inline void nohz_balance_enter_idle(int cpu) { }
22 #endif
23 
24 #ifdef CONFIG_NO_HZ_COMMON
25 void calc_load_nohz_start(void);
26 void calc_load_nohz_stop(void);
27 #else
calc_load_nohz_start(void)28 static inline void calc_load_nohz_start(void) { }
calc_load_nohz_stop(void)29 static inline void calc_load_nohz_stop(void) { }
30 #endif /* CONFIG_NO_HZ_COMMON */
31 
32 #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
33 extern void wake_up_nohz_cpu(int cpu);
34 #else
wake_up_nohz_cpu(int cpu)35 static inline void wake_up_nohz_cpu(int cpu) { }
36 #endif
37 
38 #endif /* _LINUX_SCHED_NOHZ_H */
39