Unverified Commit 8c1f5a11 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'v6.17-rockchip-arm32-1' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents d2755d3c 7cdb433b
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -279,11 +279,6 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
	}

	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
		if (rockchip_smp_prepare_sram(node)) {
			of_node_put(node);
			return;
		}

		/* enable the SCU power domain */
		pmu_set_power_domain(PMU_PWRDN_SCU, true);

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

	/* Make sure that all cores except the first are really off */
	for (i = 1; i < ncores; i++)
		pmu_set_power_domain(0 + i, false);

	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
		if (rockchip_smp_prepare_sram(node)) {
			of_node_put(node);
			return;
		}
	}

	of_node_put(node);
}

static void __init rk3036_smp_prepare_cpus(unsigned int max_cpus)