Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: shmobile: don't call platform_can_secondary_boot on UP

For rcar-gen2, we build the SMP files even for UP configurations,
and that just broke:

arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_init_fallback_ops':
pm-rcar-gen2.c:(.init.text+0x40c): undefined reference to `platform_can_secondary_boot'

This adds an compile-time check before the call to platform_can_secondary_boot,
turning the function into an empty stub for UP configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c21af444eace ("ARM: shmobile: smp: Add function to prioritize DT SMP")
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Olof Johansson <olof@lixom.net>

authored by

Arnd Bergmann and committed by
Olof Johansson
869ec056 4d2bf027

+3
+3
arch/arm/mach-shmobile/platsmp.c
··· 40 40 bool __init shmobile_smp_init_fallback_ops(void) 41 41 { 42 42 /* fallback on PSCI/smp_ops if no other DT based method is detected */ 43 + if (!IS_ENABLED(CONFIG_SMP)) 44 + return false; 45 + 43 46 return platform_can_secondary_boot() ? true : false; 44 47 }