From: Stephane Eranian - do not export i386 idle notification registration entry points because there is currently no user for this - make it more explicit that the store to idle_state must be atomic Signed-off-by: stephane eranian Signed-off-by: Andrew Morton --- arch/i386/kernel/process.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff -puN arch/i386/kernel/process.c~add-i386-idle-notifier-take-3-fix arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c~add-i386-idle-notifier-take-3-fix +++ a/arch/i386/kernel/process.c @@ -87,19 +87,18 @@ void idle_notifier_register(struct notif { 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(idle_notifier_unregister); static DEFINE_PER_CPU(volatile unsigned long, idle_state); void enter_idle(void) { - __get_cpu_var(idle_state) = 1; + /* needs to be atomic w.r.t. interrupts, not against other CPUs */ + __set_bit(0, &__get_cpu_var(idle_state)); atomic_notifier_call_chain(&idle_notifier, IDLE_START, NULL); } _