Skip to contentSkip to conversation

ARM: shmobile: allow non-SMP builds again

RFC In review Wolfram Sang 3 participants 3 messages Aug 12, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 ARM: shmobile: allow non-SMP builds again

platform_can_secondary_boot() is only available for SMP, so guard the smp_init function with some ifdeffery to allow building without SMP.

---

This is the easiest solution, but I wonder if it is the proper one? It might make sense to modify the Makefile so platsmp.o is in smp-y and not cpu-y? I may be missing here something, though.

I needed !SMP for debugging purposes, obviously.

 arch/arm/mach-shmobile/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-shmobile/platsmp.c +2 -0
index 02e21bceb0856b..d286e3ff6f6a5a 100644
@@ -37,6 +37,7 @@ bool shmobile_smp_cpu_can_disable(unsigned int cpu)
 }
 #endif
 
+#ifdef CONFIG_SMP
 bool __init shmobile_smp_init_fallback_ops(void)
 {
 	/* fallback on PSCI/smp_ops if no other DT based method is detected */
@@ -45,3 +46,4 @@ bool __init shmobile_smp_init_fallback_ops(void)
 
 	return platform_can_secondary_boot() ? true : false;
 }
+#endif
Signature · 1 line
2.8.1
#1 lore raw
Quoted 9 lines · Wolfram Sang

platform_can_secondary_boot() is only available for SMP, so guard the smp_init function with some ifdeffery to allow building without SMP.

---

This is the easiest solution, but I wonder if it is the proper one? It might make sense to modify the Makefile so platsmp.o is in smp-y and not cpu-y? I may be missing here something, though.

Wasn't this fixed by

Commit:     869ec056fa8450184423c8076e0a342db127795c
Parent:     4d2bf027e8ca499a52224e508f52a59d3858094a
Refname:    refs/heads/master
Author:     Arnd Bergmann <[email protected]>
AuthorDate: Thu Jun 30 14:25:19 2016 +0200
Committer:  Olof Johansson <[email protected]>
CommitDate: Tue Aug 2 12:34:49 2016 -0700

ARM: shmobile: don't call platform_can_secondary_boot on UP

?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 4 lines

Wasn't this fixed by

Commit: 869ec056fa8450184423c8076e0a342db127795c

Ooops, yes. Sorry, overlooked this new 'if' after rebasing from rc1 to rd/master :(