android_kernel_motorola_sm6225/arch/x86/kernel/cpu/mcheck
Rafael J. Wysocki 8735728ef8 x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
During CPU hot-remove the sysfs directory created by
threshold_create_bank(), defined in
arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
its parent directory, created by mce_create_device(), defined in
arch/x86/kernel/cpu/mcheck/mce_64.c .  Moreover, when the CPU in
question is hotplugged again, obviously the latter has to be created
before the former.  At present, the right ordering is not enforced,
because all of these operations are carried out by CPU hotplug
notifiers which are not appropriately ordered with respect to each
other.  This leads to serious problems on systems with two or more
multicore AMD CPUs, among other things during suspend and hibernation.

Fix the problem by placing threshold bank CPU hotplug callbacks in
mce_cpu_callback(), so that they are invoked at the right places,
if defined.  Additionally, use kobject_del() to remove the sysfs
directory associated with the kobject created by
kobject_create_and_add() in threshold_create_bank(), to prevent the
kernel from crashing during CPU hotplug operations on systems with
two or more multicore AMD CPUs.

This patch fixes bug #11337.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Andi Kleen <andi@firstfloor.org>
Tested-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-23 17:49:19 +02:00
..
k7.c x86: coding style fixes to arch/x86/kernel/cpu/mcheck/k7.c 2008-06-18 15:00:12 +02:00
Makefile x86: consolidate the cpu/ related code usage 2007-10-23 22:37:23 +02:00
mce.h x86: remove all definitions with fastcall 2008-01-30 13:31:17 +01:00
mce_32.c x86: coding style fixes to arch/x86/kernel/cpu/mcheck/mce_32.c 2008-04-17 17:40:50 +02:00
mce_64.c x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs 2008-08-23 17:49:19 +02:00
mce_amd_64.c x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs 2008-08-23 17:49:19 +02:00
mce_intel_64.c x86: consolidate the cpu/ related code usage 2007-10-23 22:37:23 +02:00
non-fatal.c on_each_cpu(): kill unused 'retry' parameter 2008-06-26 11:24:38 +02:00
p4.c x86: APIC: remove apic_write_around(); use alternatives 2008-07-18 12:51:21 +02:00
p5.c x86: coding style fixes to arch/x86/kernel/cpu/mcheck/p5.c 2008-04-17 17:40:48 +02:00
p6.c x86: coding style fixes to arch/x86/kernel/cpu/mcheck/p6.c 2008-04-17 17:40:49 +02:00
therm_throt.c sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
winchip.c x86: coding style fixes to arch/x86/kernel/cpu/mcheck/winchip.c 2008-04-17 17:40:50 +02:00