Skip to content

Commit 29226b1

Browse files
sudeep-hollaRussell King
authored andcommitted
ARM: 8675/1: MCPM: ensure not to enter __hyp_soft_restart from loopback and cpu_power_down
Commit 9da5ac2 ("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: 9da5ac2 ("ARM: soft-reboot into same mode that we entered the kernel") Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 2ea659a commit 29226b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm/common/mcpm_entry.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster)
235235
return ret;
236236
}
237237

238-
typedef void (*phys_reset_t)(unsigned long);
238+
typedef typeof(cpu_reset) phys_reset_t;
239239

240240
void mcpm_cpu_power_down(void)
241241
{
@@ -300,7 +300,7 @@ void mcpm_cpu_power_down(void)
300300
* on the CPU.
301301
*/
302302
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);
304304

305305
/* should never get here */
306306
BUG();
@@ -389,7 +389,7 @@ static int __init nocache_trampoline(unsigned long _arg)
389389
__mcpm_cpu_down(cpu, cluster);
390390

391391
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);
393393
BUG();
394394
}
395395

0 commit comments

Comments
 (0)