diff mbox

Move cpu hotplug driver lock from pseries to powerpc

Message ID 4B4F760C.4000507@austin.ibm.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Nathan Fontenot Jan. 14, 2010, 7:52 p.m. UTC
Move the defintion and lock helper routines for the cpu hotplug driver
lock from pseries to powerpc code to avoid build breaks for platforms 
other than pseries that use cpu hotplug.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
 arch/powerpc/kernel/smp.c              |   12 ++++++++++++
 arch/powerpc/platforms/pseries/dlpar.c |   12 ------------
 2 files changed, 12 insertions(+), 12 deletions(-)

Comments

Michael Ellerman Jan. 14, 2010, 11:39 p.m. UTC | #1
On Thu, 2010-01-14 at 13:52 -0600, Nathan Fontenot wrote:
> Move the defintion and lock helper routines for the cpu hotplug driver
> lock from pseries to powerpc code to avoid build breaks for platforms 
> other than pseries that use cpu hotplug.
> 
> Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
> ---
>  arch/powerpc/kernel/smp.c              |   12 ++++++++++++
>  arch/powerpc/platforms/pseries/dlpar.c |   12 ------------
>  2 files changed, 12 insertions(+), 12 deletions(-)

Much nicer :)

Acked-by: Michael Ellerman <michael@ellerman.id.au>

cheers
diff mbox

Patch

Index: powerpc/arch/powerpc/kernel/smp.c
===================================================================
--- powerpc.orig/arch/powerpc/kernel/smp.c	2010-01-11 12:19:06.000000000 -0600
+++ powerpc/arch/powerpc/kernel/smp.c	2010-01-14 09:44:35.000000000 -0600
@@ -619,4 +619,16 @@ 
 	if (smp_ops->cpu_die)
 		smp_ops->cpu_die(cpu);
 }
+
+static DEFINE_MUTEX(powerpc_cpu_hotplug_driver_mutex);
+
+void cpu_hotplug_driver_lock()
+{
+	mutex_lock(&powerpc_cpu_hotplug_driver_mutex);
+}
+
+void cpu_hotplug_driver_unlock()
+{
+	mutex_unlock(&powerpc_cpu_hotplug_driver_mutex);
+}
 #endif
Index: powerpc/arch/powerpc/platforms/pseries/dlpar.c
===================================================================
--- powerpc.orig/arch/powerpc/platforms/pseries/dlpar.c	2010-01-14 09:37:48.000000000 -0600
+++ powerpc/arch/powerpc/platforms/pseries/dlpar.c	2010-01-14 09:42:50.000000000 -0600
@@ -344,18 +344,6 @@ 
 
 #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
 
-static DEFINE_MUTEX(pseries_cpu_hotplug_mutex);
-
-void cpu_hotplug_driver_lock()
-{
-	mutex_lock(&pseries_cpu_hotplug_mutex);
-}
-
-void cpu_hotplug_driver_unlock()
-{
-	mutex_unlock(&pseries_cpu_hotplug_mutex);
-}
-
 static int dlpar_online_cpu(struct device_node *dn)
 {
 	int rc = 0;