From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Fix shmobile build with CONFIG_SMP=n
Date: Tue, 19 Jul 2016 12:57:03 +0100 [thread overview]
Message-ID: <20160719115703.GJ1041@n2100.armlinux.org.uk> (raw)
Shmobile currently fails to build when CONFIG_SMP is disabled:
arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_init_fallback_ops':
pm-rcar-gen2.c:(.init.text+0x744): undefined reference to `platform_can_secondary_boot'
make[1]: *** [vmlinux] Error 1
Fix this by providing a stub for this function.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
Untested, please test.
arch/arm/mach-shmobile/common.h | 7 +++++++
arch/arm/mach-shmobile/platsmp.c | 2 ++
2 files changed, 9 insertions(+)
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 1a8f7b3ab449..6badb3e41cfa 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -10,7 +10,14 @@ extern void shmobile_smp_sleep(void);
extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
unsigned long arg);
extern bool shmobile_smp_cpu_can_disable(unsigned int cpu);
+#ifdef CONFIG_SMP
extern bool shmobile_smp_init_fallback_ops(void);
+#else
+static inline bool shmobile_smp_init_fallback_ops(void)
+{
+ return false;
+}
+#endif
extern void shmobile_boot_scu(void);
extern void shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
unsigned int max_cpus);
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index f3dba6f356e2..44d91f5624a3 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -37,8 +37,10 @@ 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 */
return platform_can_secondary_boot() ? true : false;
}
+#endif
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next reply other threads:[~2016-07-19 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 11:57 Russell King - ARM Linux [this message]
2016-07-19 12:02 ` [PATCH] Fix shmobile build with CONFIG_SMP=n Geert Uytterhoeven
2016-07-20 23:14 ` Simon Horman
2016-08-02 19:35 ` Olof Johansson
2016-08-08 11:01 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160719115703.GJ1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).