Skip to content

Commit 756854d

Browse files
Lorenzo Pieralisictmarinas
authored andcommitted
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>
1 parent 5959e25 commit 756854d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎arch/arm64/kernel/cpu_ops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const struct cpu_operations *cpu_ops[NR_CPUS];
3030
static const struct cpu_operations *supported_cpu_ops[] __initconst = {
3131
#ifdef CONFIG_SMP
3232
&smp_spin_table_ops,
33-
&cpu_psci_ops,
3433
#endif
34+
&cpu_psci_ops,
3535
NULL,
3636
};
3737

‎arch/arm64/kernel/psci.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,11 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
434434
return 0;
435435
}
436436
#endif
437+
#endif
437438

438439
const struct cpu_operations cpu_psci_ops = {
439440
.name = "psci",
441+
#ifdef CONFIG_SMP
440442
.cpu_init = cpu_psci_cpu_init,
441443
.cpu_prepare = cpu_psci_cpu_prepare,
442444
.cpu_boot = cpu_psci_cpu_boot,
@@ -445,6 +447,6 @@ const struct cpu_operations cpu_psci_ops = {
445447
.cpu_die = cpu_psci_cpu_die,
446448
.cpu_kill = cpu_psci_cpu_kill,
447449
#endif
450+
#endif
448451
};
449452

450-
#endif

0 commit comments

Comments
 (0)