summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-hotplug.c
diff options
context:
space:
mode:
authorTony Lindgren2017-03-22 19:01:48 +0100
committerTony Lindgren2017-03-27 19:10:42 +0200
commit351b7c490700747d1dba1b0a10fbfe3448d11c35 (patch)
tree7f09cc2e3a85b88da50a3f83d9a53a71f0cc41ce /arch/arm/mach-omap2/omap-hotplug.c
parentARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend (diff)
downloadkernel-qcow2-linux-351b7c490700747d1dba1b0a10fbfe3448d11c35.tar.gz
kernel-qcow2-linux-351b7c490700747d1dba1b0a10fbfe3448d11c35.tar.xz
kernel-qcow2-linux-351b7c490700747d1dba1b0a10fbfe3448d11c35.zip
ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot
Commit 3251885285e1 ("ARM: OMAP4+: Reset CPU1 properly for kexec") started unconditionally resetting CPU1 because of a kexec boot issue I was seeing earlier on omap4 when doing kexec boot between two different kernel versions. This caused issues on some systems. We should only reset CPU1 as a last resort option, and try to avoid it where possible. Doing an unconditional CPU1 reset causes issues for example when booting a bootloader configured secure OS running on CPU1 as reported by Andrew F. Davis <afd@ti.com>. We can't completely remove the reset of CPU1 as it would break kexec booting from older kernels. But we can limit the CPU1 reset to cases where CPU1 is wrongly parked within the memory area used by the booting kernel. Then later on we can add support for parking CPU1 for kexec out of the SDRAM back to bootrom. So let's first fix the regression reported by Andrew by making CPU1 reset conditional. To do this, we need to: 1. Save configured AUX_CORE_BOOT_1 for later 2. Modify AUX_CORE_BOOT_0 reading code to for HS SoCs to return the whole register instead of the CPU mask 3. Check if CPU1 is wrongly parked into the booting kernel by the previous kernel and reset if needed Fixes: 3251885285e1 ("ARM: OMAP4+: Reset CPU1 properly for kexec") Reported-by: Andrew F. Davis <afd@ti.com> Cc: Andrew F. Davis <afd@ti.com> Cc: Keerthy <j-keerthy@ti.com> Cc: Russell King <rmk+kernel@armlinux.org.uk> Cc: Santosh Shilimkar <ssantosh@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Tested-by: Keerthy <j-keerthy@ti.com> Tested-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap-hotplug.c')
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index d3fb5661bb5d..433db6d0b073 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -50,7 +50,7 @@ void omap4_cpu_die(unsigned int cpu)
omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
if (omap_secure_apis_support())
- boot_cpu = omap_read_auxcoreboot0();
+ boot_cpu = omap_read_auxcoreboot0() >> 9;
else
boot_cpu =
readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;