From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: cntvoff: Add a function definition when !SMP
Date: Mon, 28 May 2018 10:40:16 +0200 [thread overview]
Message-ID: <20180528084016.9271-1-maxime.ripard@bootlin.com> (raw)
The secure_cntvoff_init function is only compiled if CONFIG_SMP is set to
true. However, that will lead to linking errors if one uses this function
without an ifdef CONFIG_SMP guard, which isn't ideal.
Provide a dumb implementation when CONFIG_SMP is false so that we don't end
up with a compilation error on our hands.
Cc: Olof Johansson <olof@lixom.net>
Cc: Myl?ne Josserand <mylene.josserand@bootlin.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Fixes: cad160ed0a94 ("ARM: shmobile: Convert file to use cntvoff")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
arch/arm/include/asm/secure_cntvoff.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/secure_cntvoff.h b/arch/arm/include/asm/secure_cntvoff.h
index 1f93aee1f630..ce96cd781838 100644
--- a/arch/arm/include/asm/secure_cntvoff.h
+++ b/arch/arm/include/asm/secure_cntvoff.h
@@ -3,6 +3,10 @@
#ifndef __ASMARM_ARCH_CNTVOFF_H
#define __ASMARM_ARCH_CNTVOFF_H
+#ifdef CONFIG_SMP
extern void secure_cntvoff_init(void);
+#else
+static inline void secure_cntvoff_init(void) {};
+#endif
#endif
--
2.17.0
next reply other threads:[~2018-05-28 8:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 8:40 Maxime Ripard [this message]
2018-06-04 16:26 ` [PATCH] arm: cntvoff: Add a function definition when !SMP Maxime Ripard
2018-06-05 6:49 ` Simon Horman
2018-06-05 12:39 ` Maxime Ripard
2018-06-06 8:25 ` Geert Uytterhoeven
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=20180528084016.9271-1-maxime.ripard@bootlin.com \
--to=maxime.ripard@bootlin.com \
--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).