mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
hotplug, powerpc, x86: Remove cpu_hotplug_driver_lock()
cpu_hotplug_driver_lock() serializes CPU online/offline operations when ARCH_CPU_PROBE_RELEASE is set. This lock interface is no longer necessary with the following reason: - lock_device_hotplug() now protects CPU online/offline operations, including the probe & release interfaces enabled by ARCH_CPU_PROBE_RELEASE. The use of cpu_hotplug_driver_lock() is redundant. - cpu_hotplug_driver_lock() is only valid when ARCH_CPU_PROBE_RELEASE is defined, which is misleading and is only enabled on powerpc. This patch removes the cpu_hotplug_driver_lock() interface. As a result, ARCH_CPU_PROBE_RELEASE only enables / disables the cpu probe & release interface as intended. There is no functional change in this patch. Signed-off-by: Toshi Kani <[email protected]> Reviewed-by: Nathan Fontenot <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
1cad5e9a39
commit
6dedcca610
5 changed files with 19 additions and 66 deletions
|
|
@ -44,13 +44,11 @@ static int __ref cpu_subsys_online(struct device *dev)
|
|||
struct cpu *cpu = container_of(dev, struct cpu, dev);
|
||||
int cpuid = dev->id;
|
||||
int from_nid, to_nid;
|
||||
int ret = -ENODEV;
|
||||
|
||||
cpu_hotplug_driver_lock();
|
||||
int ret;
|
||||
|
||||
from_nid = cpu_to_node(cpuid);
|
||||
if (from_nid == NUMA_NO_NODE)
|
||||
goto out;
|
||||
return -ENODEV;
|
||||
|
||||
ret = cpu_up(cpuid);
|
||||
/*
|
||||
|
|
@ -61,19 +59,12 @@ static int __ref cpu_subsys_online(struct device *dev)
|
|||
if (from_nid != to_nid)
|
||||
change_cpu_under_node(cpu, from_nid, to_nid);
|
||||
|
||||
out:
|
||||
cpu_hotplug_driver_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cpu_subsys_offline(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cpu_hotplug_driver_lock();
|
||||
ret = cpu_down(dev->id);
|
||||
cpu_hotplug_driver_unlock();
|
||||
return ret;
|
||||
return cpu_down(dev->id);
|
||||
}
|
||||
|
||||
void unregister_cpu(struct cpu *cpu)
|
||||
|
|
|
|||
Loading…
Reference in a new issue