Commit d0174c72 authored by Nathan Fontenot's avatar Nathan Fontenot Committed by Benjamin Herrenschmidt

powerpc: Move cpu hotplug driver lock from pseries to powerpc

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: default avatarNathan Fontenot <nfont@austin.ibm.com>
Acked-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 9becd2a0
...@@ -619,4 +619,16 @@ void __cpu_die(unsigned int cpu) ...@@ -619,4 +619,16 @@ void __cpu_die(unsigned int cpu)
if (smp_ops->cpu_die) if (smp_ops->cpu_die)
smp_ops->cpu_die(cpu); 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 #endif
...@@ -346,20 +346,6 @@ int dlpar_release_drc(u32 drc_index) ...@@ -346,20 +346,6 @@ int dlpar_release_drc(u32 drc_index)
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE #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) static int dlpar_online_cpu(struct device_node *dn)
{ {
int rc = 0; int rc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment