arch/powerpc/kernel/rtas.c | 9 +++++++++ kernel/cpu.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) Index: linux-2.6.19-rc5/arch/powerpc/kernel/rtas.c =================================================================== --- linux-2.6.19-rc5.orig/arch/powerpc/kernel/rtas.c 2006-11-08 07:54:20.000000000 +0530 +++ linux-2.6.19-rc5/arch/powerpc/kernel/rtas.c 2006-11-13 17:39:10.000000000 +0530 @@ -53,6 +53,9 @@ unsigned long rtas_rmo_buf; +extern int cpu_hotplug_disabled; +extern struct mutex cpu_add_remove_lock; + /* * If non-NULL, this gets called when the kernel terminates. * This is done like this so rtas_flash can be a module. @@ -881,6 +884,12 @@ #ifdef CONFIG_HOTPLUG_CPU rtas_stop_self_args.token = rtas_token("stop-self"); + if(rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE) { + mutex_lock(&cpu_add_remove_lock); + cpu_hotplug_disabled = 1; + mutex_unlock(&cpu_add_remove_lock); + } + #endif /* CONFIG_HOTPLUG_CPU */ #ifdef CONFIG_RTAS_ERROR_LOGGING rtas_last_error_token = rtas_token("rtas-last-error"); Index: linux-2.6.19-rc5/kernel/cpu.c =================================================================== --- linux-2.6.19-rc5.orig/kernel/cpu.c 2006-11-08 07:54:20.000000000 +0530 +++ linux-2.6.19-rc5/kernel/cpu.c 2006-11-13 17:36:22.000000000 +0530 @@ -16,7 +16,7 @@ #include /* This protects CPUs going up and down... */ -static DEFINE_MUTEX(cpu_add_remove_lock); +DEFINE_MUTEX(cpu_add_remove_lock); static DEFINE_MUTEX(cpu_bitmask_lock); static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain); @@ -24,7 +24,7 @@ /* If set, cpu_up and cpu_down will return -EBUSY and do nothing. * Should always be manipulated under cpu_add_remove_lock */ -static int cpu_hotplug_disabled; +int cpu_hotplug_disabled; #ifdef CONFIG_HOTPLUG_CPU