summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/psci.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2013-10-24 20:30:15 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 11:33:20 +0100
commitcd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab (patch)
tree47876c066537a8c251ad483637c0f4d70dab5cf4 /arch/arm64/kernel/psci.c
parent00ef54bb97389bfe8894272f48496f4191aae946 (diff)
downloadlinux-cd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab.tar.gz
linux-cd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab.tar.bz2
linux-cd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab.zip
arm64: reorganise smp_enable_ops
For hotplug support, we're going to want a place to store operations that do more than bring CPUs online, and it makes sense to group these with our current smp_enable_ops. For cpuidle support, we'll want to group additional functions, and we may want them even for UP kernels. This patch renames smp_enable_ops to the more general cpu_operations, and pulls the definitions out of smp code such that they can be used in UP kernels. While we're at it, fix up instances of the cpu parameter to be an unsigned int, drop the init markings and rename the *_cpu functions to cpu_* to reduce future churn when cpu_operations is extended. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/psci.c')
-rw-r--r--arch/arm64/kernel/psci.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 368b78788cb5..ccec2ca67755 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -20,6 +20,7 @@
#include <linux/smp.h>
#include <asm/compiler.h>
+#include <asm/cpu_ops.h>
#include <asm/errno.h>
#include <asm/psci.h>
#include <asm/smp_plat.h>
@@ -231,12 +232,12 @@ out_put_node:
#ifdef CONFIG_SMP
-static int __init smp_psci_init_cpu(struct device_node *dn, int cpu)
+static int __init cpu_psci_cpu_init(struct device_node *dn, unsigned int cpu)
{
return 0;
}
-static int __init smp_psci_prepare_cpu(int cpu)
+static int __init cpu_psci_cpu_prepare(unsigned int cpu)
{
int err;
@@ -254,10 +255,10 @@ static int __init smp_psci_prepare_cpu(int cpu)
return 0;
}
-const struct smp_enable_ops smp_psci_ops __initconst = {
+const struct cpu_operations cpu_psci_ops = {
.name = "psci",
- .init_cpu = smp_psci_init_cpu,
- .prepare_cpu = smp_psci_prepare_cpu,
+ .cpu_init = cpu_psci_cpu_init,
+ .cpu_prepare = cpu_psci_cpu_prepare,
};
#endif