kernel/cpu.c: create a CPU_STARTING cpu_chain notifier
authorManfred Spraul <manfred@colorfullife.com>
Sun, 7 Sep 2008 14:57:22 +0000 (16:57 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 8 Sep 2008 17:25:24 +0000 (19:25 +0200)
commite545a6140b698b2494daf0b32107bdcc5e901390
tree63f302e25ba7a0705bbf051f3817fac8f8b98aba
parent7686ad5606f08d9dfb33a2087a36c8366366015b
kernel/cpu.c: create a CPU_STARTING cpu_chain notifier

Right now, there is no notifier that is called on a new cpu, before the new
cpu begins processing interrupts/softirqs.
Various kernel function would need that notification, e.g. kvm works around
by calling smp_call_function_single(), rcu polls cpu_online_map.

The patch adds a CPU_STARTING notification. It also adds a helper function
that sends the message to all cpu_chain handlers.

Tested on x86-64.
All other archs are untested. Especially on sparc, I'm not sure if I got
it right.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 files changed:
arch/alpha/kernel/smp.c
arch/arm/kernel/smp.c
arch/cris/arch-v32/kernel/smp.c
arch/ia64/kernel/smpboot.c
arch/m32r/kernel/smpboot.c
arch/mips/kernel/smp.c
arch/powerpc/kernel/smp.c
arch/s390/kernel/smp.c
arch/sh/kernel/smp.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/um/kernel/smp.c
arch/x86/kernel/smpboot.c
arch/x86/mach-voyager/voyager_smp.c
include/linux/cpu.h
include/linux/notifier.h
kernel/cpu.c