Skip to content

Commit 274afbc

Browse files
baolin-wangsre
authored andcommitted
power: reset: sc27xx: Change to use cpu_down()
To allow the SC27XX driver can be built as a module, and the freeze_secondary_cpus() symbol is not exported, thus we can change to use the exported cpu_down() API to shut down other cpus to avoid racing, which is same as the freeze_secondary_cpus(). Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 6cdd5b0 commit 274afbc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/power/reset/sc27xx-poweroff.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ static struct regmap *regmap;
2929
*/
3030
static void sc27xx_poweroff_shutdown(void)
3131
{
32-
#ifdef CONFIG_PM_SLEEP_SMP
33-
int cpu = smp_processor_id();
32+
#ifdef CONFIG_HOTPLUG_CPU
33+
int cpu;
3434

35-
freeze_secondary_cpus(cpu);
35+
for_each_online_cpu(cpu) {
36+
if (cpu != smp_processor_id())
37+
cpu_down(cpu);
38+
}
3639
#endif
3740
}
3841

0 commit comments

Comments
 (0)