powerpc: Move cpu hotplug driver lock from pseries to powerpc
authorNathan Fontenot <nfont@austin.ibm.com>
Thu, 14 Jan 2010 09:52:44 +0000 (09:52 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 15 Jan 2010 02:26:18 +0000 (13:26 +1100)
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>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/smp.c
arch/powerpc/platforms/pseries/dlpar.c

index a521fb8a40ee2fcb206397cf490aab9550cf9c96..c2ee1449807766cd24969621c31469386f208ebb 100644 (file)
@@ -619,4 +619,16 @@ void __cpu_die(unsigned int cpu)
        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 3bd8df8af70b43cd25a4c046c2dd0a15f542eab4..37bce52526da52f156841e364ed6998456d6a18a 100644 (file)
@@ -346,20 +346,6 @@ int dlpar_release_drc(u32 drc_index)
 
 #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
 
-static DEFINE_MUTEX(pseries_cpu_hotplug_mutex);
-
-void cpu_hotplug_driver_lock(void)
-__acquires(pseries_cpu_hotplug_mutex)
-{
-       mutex_lock(&pseries_cpu_hotplug_mutex);
-}
-
-void cpu_hotplug_driver_unlock(void)
-__releases(pseries_cpu_hotplug_mutex)
-{
-       mutex_unlock(&pseries_cpu_hotplug_mutex);
-}
-
 static int dlpar_online_cpu(struct device_node *dn)
 {
        int rc = 0;