History

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.

Peter Zijlstra committed 3 years ago

Commit a01353c1 parent 0c5ffc315 files · +86 −66Browse files

Showing the changes to kernel/time (1 of 15 files). Show all

Unified · Split

kernel/time/tick-broadcast.c+5−1
@@ -622,9 +622,13 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void) · 621 unmodified lines
622622 * to avoid a deep idle transition as we are about to get the
623623 * broadcast IPI right away.
624624 */
625−int tick_check_broadcast_expired(void)
625+noinstr int tick_check_broadcast_expired(void)
626626 {
627+#ifdef _ASM_GENERIC_BITOPS_INSTRUMENTED_NON_ATOMIC_H
628+ return arch_test_bit(smp_processor_id(), cpumask_bits(tick_broadcast_force_mask));
629+#else
627630 return cpumask_test_cpu(smp_processor_id(), tick_broadcast_force_mask);
631+#endif
628632 }
629633
630634 /*