aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2017-05-18 12:09:59 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2017-05-23 12:26:08 -0400
commit29226b198bb26f8e23985d011a9301cee5550da8 (patch)
treea00024811353b58d2c1959851a9e090f3c18bfe3
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
ARM: 8675/1: MCPM: ensure not to enter __hyp_soft_restart from loopback and cpu_power_down
Commit 9da5ac236de6 ("ARM: soft-reboot into same mode that we entered the kernel") added support to enter the new kernel in the same processor mode as the previous one when we soft-reboot from one kernel into another by pass a flag to cpu_reset() so it knows what to do exactly. However it missed to make similar changes in MCPM code. Due to the missing flag, the CPUs enter HYP mode which is not supported with MCPM. MCPM works only in secure mode as it manages CCI. This patch aligns the cpu_reset call in MCPM with other changes in the above mentioned commit by making phys_reset_t to follow the prototype of cpu_reset(). Fixes: 9da5ac236de6 ("ARM: soft-reboot into same mode that we entered the kernel") Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/common/mcpm_entry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index cf062472e07b..2b913f17d50f 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -235,7 +235,7 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster)
235 return ret; 235 return ret;
236} 236}
237 237
238typedef void (*phys_reset_t)(unsigned long); 238typedef typeof(cpu_reset) phys_reset_t;
239 239
240void mcpm_cpu_power_down(void) 240void mcpm_cpu_power_down(void)
241{ 241{
@@ -300,7 +300,7 @@ void mcpm_cpu_power_down(void)
300 * on the CPU. 300 * on the CPU.
301 */ 301 */
302 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset); 302 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
303 phys_reset(__pa_symbol(mcpm_entry_point)); 303 phys_reset(__pa_symbol(mcpm_entry_point), false);
304 304
305 /* should never get here */ 305 /* should never get here */
306 BUG(); 306 BUG();
@@ -389,7 +389,7 @@ static int __init nocache_trampoline(unsigned long _arg)
389 __mcpm_cpu_down(cpu, cluster); 389 __mcpm_cpu_down(cpu, cluster);
390 390
391 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset); 391 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
392 phys_reset(__pa_symbol(mcpm_entry_point)); 392 phys_reset(__pa_symbol(mcpm_entry_point), false);
393 BUG(); 393 BUG();
394} 394}
395 395