Skip to content

Commit 20fb502

Browse files
Qais YousefKAGA-KOKO
authored andcommitted
firmware: psci: Replace cpu_up/down() with add/remove_cpu()
The core device API performs extra housekeeping bits that are missing from directly calling cpu_up/down(). See commit a6717c0 ("powerpc/rtas: use device model APIs and serialization during LPM") for an example description of what might go wrong. This also prepares to make cpu_up/down a private interface of the CPU subsystem. Signed-off-by: Qais Yousef <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent a926f81 commit 20fb502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/psci/psci_checker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static unsigned int down_and_up_cpus(const struct cpumask *cpus,
8484

8585
/* Try to power down all CPUs in the mask. */
8686
for_each_cpu(cpu, cpus) {
87-
int ret = cpu_down(cpu);
87+
int ret = remove_cpu(cpu);
8888

8989
/*
9090
* cpu_down() checks the number of online CPUs before the TOS
@@ -116,7 +116,7 @@ static unsigned int down_and_up_cpus(const struct cpumask *cpus,
116116

117117
/* Try to power up all the CPUs that have been offlined. */
118118
for_each_cpu(cpu, offlined_cpus) {
119-
int ret = cpu_up(cpu);
119+
int ret = add_cpu(cpu);
120120

121121
if (ret != 0) {
122122
pr_err("Error occurred (%d) while trying "

0 commit comments

Comments
 (0)