Skip to content

Commit

Permalink
powerpc: Move cpu hotplug driver lock from pseries to powerpc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nathan Fontenot authored and Benjamin Herrenschmidt committed Jan 15, 2010
1 parent 9becd2a commit d0174c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 12 additions & 0 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 0 additions & 14 deletions arch/powerpc/platforms/pseries/dlpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0174c7

Please sign in to comment.