mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-10 00:02:16 +08:00
cpuidle: Fix ct_idle_*() usage
The whole disable-RCU, enable-IRQS dance is very intricate since changing IRQ state is traced, which depends on RCU. Add two helpers for the cpuidle case that mirror the entry code: ct_cpuidle_enter() ct_cpuidle_exit() And fix all the cases where the enter/exit dance was buggy. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20230112195540.130014793@infradead.org
This commit is contained in:
committed by
Ingo Molnar
parent
0c5ffc3d7b
commit
a01353cf18
@@ -211,7 +211,7 @@ extern int tick_receive_broadcast(void);
|
||||
extern void tick_setup_hrtimer_broadcast(void);
|
||||
extern int tick_check_broadcast_expired(void);
|
||||
# else
|
||||
static inline int tick_check_broadcast_expired(void) { return 0; }
|
||||
static __always_inline int tick_check_broadcast_expired(void) { return 0; }
|
||||
static inline void tick_setup_hrtimer_broadcast(void) { }
|
||||
# endif
|
||||
|
||||
@@ -219,7 +219,7 @@ static inline void tick_setup_hrtimer_broadcast(void) { }
|
||||
|
||||
static inline void clockevents_suspend(void) { }
|
||||
static inline void clockevents_resume(void) { }
|
||||
static inline int tick_check_broadcast_expired(void) { return 0; }
|
||||
static __always_inline int tick_check_broadcast_expired(void) { return 0; }
|
||||
static inline void tick_setup_hrtimer_broadcast(void) { }
|
||||
|
||||
#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
|
||||
|
||||
Reference in New Issue
Block a user