提交 756854d9 编写于 作者: L Lorenzo Pieralisi 提交者: Catalin Marinas

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: NMark Rutland <mark.rutland@arm.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 5959e257
...@@ -30,8 +30,8 @@ const struct cpu_operations *cpu_ops[NR_CPUS]; ...@@ -30,8 +30,8 @@ const struct cpu_operations *cpu_ops[NR_CPUS];
static const struct cpu_operations *supported_cpu_ops[] __initconst = { static const struct cpu_operations *supported_cpu_ops[] __initconst = {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
&smp_spin_table_ops, &smp_spin_table_ops,
&cpu_psci_ops,
#endif #endif
&cpu_psci_ops,
NULL, NULL,
}; };
......
...@@ -434,9 +434,11 @@ static int cpu_psci_cpu_kill(unsigned int cpu) ...@@ -434,9 +434,11 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
return 0; return 0;
} }
#endif #endif
#endif
const struct cpu_operations cpu_psci_ops = { const struct cpu_operations cpu_psci_ops = {
.name = "psci", .name = "psci",
#ifdef CONFIG_SMP
.cpu_init = cpu_psci_cpu_init, .cpu_init = cpu_psci_cpu_init,
.cpu_prepare = cpu_psci_cpu_prepare, .cpu_prepare = cpu_psci_cpu_prepare,
.cpu_boot = cpu_psci_cpu_boot, .cpu_boot = cpu_psci_cpu_boot,
...@@ -445,6 +447,6 @@ const struct cpu_operations cpu_psci_ops = { ...@@ -445,6 +447,6 @@ const struct cpu_operations cpu_psci_ops = {
.cpu_die = cpu_psci_cpu_die, .cpu_die = cpu_psci_cpu_die,
.cpu_kill = cpu_psci_cpu_kill, .cpu_kill = cpu_psci_cpu_kill,
#endif #endif
#endif
}; };
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册