lkml.org 
[lkml]   [2020]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] firmware: arm_scmi: fix psci dependency
Date
When CONFIG_ARM_PSCI_FW is disabled but CONFIG_HAVE_ARM_SMCCC is enabled,
arm-scmi runs into a link failure:

arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/smc.o: in function `smc_send_message':
smc.c:(.text+0x200): undefined reference to `arm_smccc_1_1_get_conduit'

Use an inline helper to default to version v1.0 in the absence of psci.

Fixes: 1dc6558062da ("firmware: arm_scmi: Add smc/hvc transport")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/arm-smccc.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index 59494df0f55b..4f7c962856c0 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -95,7 +95,14 @@ enum arm_smccc_conduit {
*
* When SMCCCv1.1 is not present, returns SMCCC_CONDUIT_NONE.
*/
+#ifdef CONFIG_ARM_PSCI_FW
enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void);
+#else
+static inline enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
+{
+ return SMCCC_CONDUIT_NONE;
+}
+#endif

/**
* struct arm_smccc_res - Result from SMC/HVC call
--
2.26.0
\
 
 \ /
  Last update: 2020-05-05 16:09    [W:0.057 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site