Loading arch/arm64/kernel/process.c +10 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,16 @@ void arch_cpu_idle(void) trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); } void arch_cpu_idle_enter(void) { idle_notifier_call_chain(IDLE_START); } void arch_cpu_idle_exit(void) { idle_notifier_call_chain(IDLE_END); } #ifdef CONFIG_HOTPLUG_CPU void arch_cpu_idle_dead(void) { Loading include/linux/cpu.h +7 −0 Original line number Diff line number Diff line Loading @@ -221,4 +221,11 @@ static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; extern bool cpu_mitigations_off(void); extern bool cpu_mitigations_auto_nosmt(void); #define IDLE_START 1 #define IDLE_END 2 void idle_notifier_register(struct notifier_block *n); void idle_notifier_unregister(struct notifier_block *n); void idle_notifier_call_chain(unsigned long val); #endif /* _LINUX_CPU_H_ */ kernel/cpu.c +20 −0 Original line number Diff line number Diff line Loading @@ -2498,3 +2498,23 @@ bool cpu_mitigations_auto_nosmt(void) return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT; } EXPORT_SYMBOL_GPL(cpu_mitigations_auto_nosmt); static ATOMIC_NOTIFIER_HEAD(idle_notifier); void idle_notifier_register(struct notifier_block *n) { atomic_notifier_chain_register(&idle_notifier, n); } EXPORT_SYMBOL_GPL(idle_notifier_register); void idle_notifier_unregister(struct notifier_block *n) { atomic_notifier_chain_unregister(&idle_notifier, n); } EXPORT_SYMBOL_GPL(idle_notifier_unregister); void idle_notifier_call_chain(unsigned long val) { atomic_notifier_call_chain(&idle_notifier, val, NULL); } EXPORT_SYMBOL_GPL(idle_notifier_call_chain); Loading
arch/arm64/kernel/process.c +10 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,16 @@ void arch_cpu_idle(void) trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); } void arch_cpu_idle_enter(void) { idle_notifier_call_chain(IDLE_START); } void arch_cpu_idle_exit(void) { idle_notifier_call_chain(IDLE_END); } #ifdef CONFIG_HOTPLUG_CPU void arch_cpu_idle_dead(void) { Loading
include/linux/cpu.h +7 −0 Original line number Diff line number Diff line Loading @@ -221,4 +221,11 @@ static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; extern bool cpu_mitigations_off(void); extern bool cpu_mitigations_auto_nosmt(void); #define IDLE_START 1 #define IDLE_END 2 void idle_notifier_register(struct notifier_block *n); void idle_notifier_unregister(struct notifier_block *n); void idle_notifier_call_chain(unsigned long val); #endif /* _LINUX_CPU_H_ */
kernel/cpu.c +20 −0 Original line number Diff line number Diff line Loading @@ -2498,3 +2498,23 @@ bool cpu_mitigations_auto_nosmt(void) return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT; } EXPORT_SYMBOL_GPL(cpu_mitigations_auto_nosmt); static ATOMIC_NOTIFIER_HEAD(idle_notifier); void idle_notifier_register(struct notifier_block *n) { atomic_notifier_chain_register(&idle_notifier, n); } EXPORT_SYMBOL_GPL(idle_notifier_register); void idle_notifier_unregister(struct notifier_block *n) { atomic_notifier_chain_unregister(&idle_notifier, n); } EXPORT_SYMBOL_GPL(idle_notifier_unregister); void idle_notifier_call_chain(unsigned long val) { atomic_notifier_call_chain(&idle_notifier, val, NULL); } EXPORT_SYMBOL_GPL(idle_notifier_call_chain);