aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>2014-07-17 13:19:18 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2014-07-18 10:23:25 -0400
commit756854d9b99a735f86bc3b86df5c19be12e8746e (patch)
tree58adf39e1951db36975cedd8704ae05bce7b315d
parent5959e25729a521097856d71528504deda1e11584 (diff)
arm64: kernel: enable PSCI cpu operations on UP systems
PSCI CPU operations have to be enabled on UP kernels so that calls like eg cpu_suspend can be made functional on UP too. This patch reworks the PSCI CPU operations so that they can be enabled on UP systems. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/kernel/cpu_ops.c2
-rw-r--r--arch/arm64/kernel/psci.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c
index d62d12fb36c8..cce952440c64 100644
--- a/arch/arm64/kernel/cpu_ops.c
+++ b/arch/arm64/kernel/cpu_ops.c
@@ -30,8 +30,8 @@ const struct cpu_operations *cpu_ops[NR_CPUS];
30static const struct cpu_operations *supported_cpu_ops[] __initconst = { 30static const struct cpu_operations *supported_cpu_ops[] __initconst = {
31#ifdef CONFIG_SMP 31#ifdef CONFIG_SMP
32 &smp_spin_table_ops, 32 &smp_spin_table_ops,
33 &cpu_psci_ops,
34#endif 33#endif
34 &cpu_psci_ops,
35 NULL, 35 NULL,
36}; 36};
37 37
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 9e9798f91172..a623c44a6bc4 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -434,9 +434,11 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
434 return 0; 434 return 0;
435} 435}
436#endif 436#endif
437#endif
437 438
438const struct cpu_operations cpu_psci_ops = { 439const struct cpu_operations cpu_psci_ops = {
439 .name = "psci", 440 .name = "psci",
441#ifdef CONFIG_SMP
440 .cpu_init = cpu_psci_cpu_init, 442 .cpu_init = cpu_psci_cpu_init,
441 .cpu_prepare = cpu_psci_cpu_prepare, 443 .cpu_prepare = cpu_psci_cpu_prepare,
442 .cpu_boot = cpu_psci_cpu_boot, 444 .cpu_boot = cpu_psci_cpu_boot,
@@ -445,6 +447,6 @@ const struct cpu_operations cpu_psci_ops = {
445 .cpu_die = cpu_psci_cpu_die, 447 .cpu_die = cpu_psci_cpu_die,
446 .cpu_kill = cpu_psci_cpu_kill, 448 .cpu_kill = cpu_psci_cpu_kill,
447#endif 449#endif
450#endif
448}; 451};
449 452
450#endif