summaryrefslogtreecommitdiffstats
path: root/drivers/base/cpu.c
diff options
context:
space:
mode:
authorQais Yousef <qais.yousef@arm.com>2020-03-23 14:51:10 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-03-25 12:59:38 +0100
commit33c3736ec88811b9b6f6ce2cc8967f6b97c3db5e (patch)
tree7960a1c3986d52a2db8c9fef31b92faa1696843f /drivers/base/cpu.c
parentcpu/hotplug: Move bringup of secondary CPUs out of smp_init() (diff)
downloadlinux-33c3736ec88811b9b6f6ce2cc8967f6b97c3db5e.tar.xz
linux-33c3736ec88811b9b6f6ce2cc8967f6b97c3db5e.zip
cpu/hotplug: Hide cpu_up/down()
Use separate functions for the device core to bring a CPU up and down. Users outside the device core must use add/remove_cpu() which will take care of extra housekeeping work like keeping sysfs in sync. Make cpu_up/down() static and replace the extra layer of indirection. [ tglx: Removed the extra wrapper functions and adjusted function names ] Signed-off-by: Qais Yousef <qais.yousef@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200323135110.30522-18-qais.yousef@arm.com
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r--drivers/base/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 6265871a4af2..b93a8f82f215 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -55,7 +55,7 @@ static int cpu_subsys_online(struct device *dev)
if (from_nid == NUMA_NO_NODE)
return -ENODEV;
- ret = cpu_up(cpuid);
+ ret = cpu_device_up(dev);
/*
* When hot adding memory to memoryless node and enabling a cpu
* on the node, node number of the cpu may internally change.
@@ -69,7 +69,7 @@ static int cpu_subsys_online(struct device *dev)
static int cpu_subsys_offline(struct device *dev)
{
- return cpu_down(dev->id);
+ return cpu_device_down(dev);
}
void unregister_cpu(struct cpu *cpu)