arm64: kernel: enable PSCI cpu operations on UP systems
authorLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Thu, 17 Jul 2014 17:19:18 +0000 (18:19 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 21 Jan 2015 22:57:59 +0000 (22:57 +0000)
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>
(cherry picked from commit 756854d9b99a735f86bc3b86df5c19be12e8746e)
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm64/kernel/cpu_ops.c
arch/arm64/kernel/psci.c

index 04efea8fe4bcde40f1fda6df56f24053e017d7a0..24fb449bc6aa31dca4aa9b4f5dd15685106113e1 100644 (file)
@@ -30,8 +30,8 @@ const struct cpu_operations *cpu_ops[NR_CPUS];
 static const struct cpu_operations *supported_cpu_ops[] __initconst = {
 #ifdef CONFIG_SMP
        &smp_spin_table_ops,
-       &cpu_psci_ops,
 #endif
+       &cpu_psci_ops,
        NULL,
 };
 
index 9e9798f91172ecb9d340c975f6260b1889ddec99..a623c44a6bc4ed21d9033ebafcb812a9418e7052 100644 (file)
@@ -434,9 +434,11 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
        return 0;
 }
 #endif
+#endif
 
 const struct cpu_operations cpu_psci_ops = {
        .name           = "psci",
+#ifdef CONFIG_SMP
        .cpu_init       = cpu_psci_cpu_init,
        .cpu_prepare    = cpu_psci_cpu_prepare,
        .cpu_boot       = cpu_psci_cpu_boot,
@@ -445,6 +447,6 @@ const struct cpu_operations cpu_psci_ops = {
        .cpu_die        = cpu_psci_cpu_die,
        .cpu_kill       = cpu_psci_cpu_kill,
 #endif
+#endif
 };
 
-#endif