linux/arch/x86/kernel/cpu
Andreas Herrmann bae19fe033 x86: don't call mce_create_device on CPU_UP_PREPARE
Fix regression introduced with d435d862ba
("cpu hotplug: mce: fix cpu hotplug error handling").

A CPU which was not brought up during boot (using maxcpus and
additional_cpus parameters) couldn't be onlined anymore.  For such a CPU it
seemed that MCE was not supported during CPU_UP_PREPARE-time which caused
mce_cpu_callback to return NOTIFY_BAD to notifier_call_chain.  To fix this
we:

 - call mce_create_device for CPU_ONLINE event (instead of CPU_UP_PREPARE),
 - avoid mce_remove_device() for the CPU that is not correctly initialized
   by mce_create_device() failure,
 - make mce_cpu_callback always return NOTIFY_OK for CPU_ONLINE event.
   Because CPU_ONLINE callback return value is always ignored.

[akinobu.mita@gmail.com: avoid mce_remove_device() for not initialized device]
[akinobu.mita@gmail.com: make mce_cpu_callback always return NOTIFY_OK]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:44 -08:00
..
cpufreq Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
mcheck x86: don't call mce_create_device on CPU_UP_PREPARE 2007-11-14 18:45:44 -08:00
mtrr x86: make ipi_handler() always defined 2007-11-09 22:39:38 +01:00
addon_cpuid_features.c i386: move kernel/cpu 2007-10-11 11:16:58 +02:00
amd.c spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
bugs.c Delete filenames in comments. 2007-10-13 10:01:23 -07:00
centaur.c spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
common.c spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
cpu.h i386: move kernel/cpu 2007-10-11 11:16:58 +02:00
cyrix.c spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
intel.c i386: fix section mismatch warning in intel.c 2007-10-17 20:15:26 +02:00
intel_cacheinfo.c x86: convert cpuinfo_x86 array to a per_cpu array 2007-10-19 20:35:04 +02:00
Makefile x86: prepare consolidation of cpu/ related Makefiles 2007-10-23 22:37:23 +02:00
nexgen.c i386: move kernel/cpu 2007-10-11 11:16:58 +02:00
perfctr-watchdog.c i386: do not BUG_ON() when MSR is unknown 2007-10-19 20:35:04 +02:00
proc.c x86: additional CPUID strings; fix strings for AMD-ecx 2007-10-30 00:22:22 +01:00
transmeta.c i386: move kernel/cpu 2007-10-11 11:16:58 +02:00
umc.c i386: move kernel/cpu 2007-10-11 11:16:58 +02:00