aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/psci.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2013-10-24 15:30:15 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 06:33:20 -0400
commitcd1aebf5277a3a154a9e4c0ea4b3acabb62e5cab (patch)
tree47876c066537a8c251ad483637c0f4d70dab5cf4 /arch/arm64/kernel/psci.c
parent00ef54bb97389bfe8894272f48496f4191aae946 (diff)
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 @@
20#include <linux/smp.h> 20#include <linux/smp.h>
21 21
22#include <asm/compiler.h> 22#include <asm/compiler.h>
23#include <asm/cpu_ops.h>
23#include <asm/errno.h> 24#include <asm/errno.h>
24#include <asm/psci.h> 25#include <asm/psci.h>
25#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
@@ -231,12 +232,12 @@ out_put_node:
231 232
232#ifdef CONFIG_SMP 233#ifdef CONFIG_SMP
233 234
234static int __init smp_psci_init_cpu(struct device_node *dn, int cpu) 235static int __init cpu_psci_cpu_init(struct device_node *dn, unsigned int cpu)
235{ 236{
236 return 0; 237 return 0;
237} 238}
238 239
239static int __init smp_psci_prepare_cpu(int cpu) 240static int __init cpu_psci_cpu_prepare(unsigned int cpu)
240{ 241{
241 int err; 242 int err;
242 243
@@ -254,10 +255,10 @@ static int __init smp_psci_prepare_cpu(int cpu)
254 return 0; 255 return 0;
255} 256}
256 257
257const struct smp_enable_ops smp_psci_ops __initconst = { 258const struct cpu_operations cpu_psci_ops = {
258 .name = "psci", 259 .name = "psci",
259 .init_cpu = smp_psci_init_cpu, 260 .cpu_init = cpu_psci_cpu_init,
260 .prepare_cpu = smp_psci_prepare_cpu, 261 .cpu_prepare = cpu_psci_cpu_prepare,
261}; 262};
262 263
263#endif 264#endif