Skip to content

Commit c21af44

Browse files
Magnus Dammhorms
authored andcommitted
ARM: shmobile: smp: Add function to prioritize DT SMP
Add a function to check if other DT based method is available, and if so return false to not hook up smp_ops from the machine vector. This results in that DT-based SMP support has priority over older C-based smp_ops code, and in case DT-based SMP support code does not exist in the DTB then the old smp_ops code will still work as-is. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 parent 5f3bca0 commit c21af44

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/arm/mach-shmobile/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extern void shmobile_smp_sleep(void);
1010
extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
1111
unsigned long arg);
1212
extern bool shmobile_smp_cpu_can_disable(unsigned int cpu);
13+
extern bool shmobile_smp_init_fallback_ops(void);
1314
extern void shmobile_boot_scu(void);
1415
extern void shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
1516
unsigned int max_cpus);

arch/arm/mach-shmobile/platsmp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ bool shmobile_smp_cpu_can_disable(unsigned int cpu)
3636
return true; /* Hotplug of any CPU is supported */
3737
}
3838
#endif
39+
40+
bool __init shmobile_smp_init_fallback_ops(void)
41+
{
42+
/* fallback on PSCI/smp_ops if no other DT based method is detected */
43+
return platform_can_secondary_boot() ? true : false;
44+
}

0 commit comments

Comments
 (0)