Skip to content

Commit 3131d97

Browse files
linuswarndb
authored andcommitted
ARM: ux500: resume the second core properly
The pen hold/release scheme was copied over to Ux500 from the ARM reference designs like most of these at the time. It is not needed at all, and was mostly removed in commit c00def7 "ARM: ux500: simplify secondary CPU boot". However on the suspend/resume path and hot plug/unplug of CPUs, the .cpu_die() callback was still waiting for the pen to be released which made it spin forever and the second core never come back online after suspend/resume. Fix this by simply replacing the strange custom .cpu_die() with a oneline wfi() just like e.g. the qcom platform does. This fixes the issue and makes the second core come up properly after suspend/resume. As a side effect, this rids us of the completely surplus local setup.h and hotplug.c files, and we just compile this into platsmp.c with everything else SMP. Cc: stable@vger.kernel.org Fixes: c00def7 ("ARM: ux500: simplify secondary CPU boot") Cc: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent d4b80d9 commit 3131d97

File tree

5 files changed

+7
-60
lines changed

5 files changed

+7
-60
lines changed

arch/arm/mach-ux500/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@
55
obj-y := pm.o
66
obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o
77
obj-$(CONFIG_SMP) += platsmp.o
8-
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
98
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
10-
11-
CFLAGS_hotplug.o += -march=armv7-a

arch/arm/mach-ux500/cpu-db8500.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include <asm/mach/map.h>
3232
#include <asm/mach/arch.h>
3333

34-
#include "setup.h"
35-
3634
#include "db8500-regs.h"
3735

3836
static int __init ux500_l2x0_unlock(void)

arch/arm/mach-ux500/hotplug.c

Lines changed: 0 additions & 37 deletions
This file was deleted.

arch/arm/mach-ux500/platsmp.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <asm/smp_plat.h>
2424
#include <asm/smp_scu.h>
2525

26-
#include "setup.h"
27-
2826
#include "db8500-regs.h"
2927

3028
/* Magic triggers in backup RAM */
@@ -90,6 +88,13 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
9088
return 0;
9189
}
9290

91+
#ifdef CONFIG_HOTPLUG_CPU
92+
void ux500_cpu_die(unsigned int cpu)
93+
{
94+
wfi();
95+
}
96+
#endif
97+
9398
static const struct smp_operations ux500_smp_ops __initconst = {
9499
.smp_prepare_cpus = ux500_smp_prepare_cpus,
95100
.smp_boot_secondary = ux500_boot_secondary,

arch/arm/mach-ux500/setup.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)