Skip to content

Commit 8c1f5a1

Browse files
committed
Merge tag 'v6.17-rockchip-arm32-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/arm
Fix for seldom hangs when bringing up arm32 cpu cores. * tag 'v6.17-rockchip-arm32-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: fix kernel hang during smp initialization Link: https://lore.kernel.org/r/12434765.CDJkKcVGEf@phil Signed-off-by: Arnd Bergmann <[email protected]>
2 parents d2755d3 + 7cdb433 commit 8c1f5a1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

arch/arm/mach-rockchip/platsmp.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,6 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
279279
}
280280

281281
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
282-
if (rockchip_smp_prepare_sram(node)) {
283-
of_node_put(node);
284-
return;
285-
}
286-
287282
/* enable the SCU power domain */
288283
pmu_set_power_domain(PMU_PWRDN_SCU, true);
289284

@@ -316,11 +311,19 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
316311
asm ("mrc p15, 1, %0, c9, c0, 2\n" : "=r" (l2ctlr));
317312
ncores = ((l2ctlr >> 24) & 0x3) + 1;
318313
}
319-
of_node_put(node);
320314

321315
/* Make sure that all cores except the first are really off */
322316
for (i = 1; i < ncores; i++)
323317
pmu_set_power_domain(0 + i, false);
318+
319+
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
320+
if (rockchip_smp_prepare_sram(node)) {
321+
of_node_put(node);
322+
return;
323+
}
324+
}
325+
326+
of_node_put(node);
324327
}
325328

326329
static void __init rk3036_smp_prepare_cpus(unsigned int max_cpus)

0 commit comments

Comments
 (0)