Skip to content

Commit c50031f

Browse files
committed
firmware: qcom: scm: Don't break compile test on non-ARM platforms
The introduction of __qcom_scm_set_boot_addr_mc() relies on cpu_logical_map() and MPIDR_AFFINITY_LEVEL() from smp_plat.h, but only ARM and ARM64 has this include file, so the introduction of this dependency broke compile testing on e.g. x86_64. Make the inclusion of smp_plat.h and the affected function depend on ARM || ARM64 to allow the code to still be compiled. Fixes: 55845f4 ("firmware: qcom: scm: Add support for MC boot address API") Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e1b391e commit c50031f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/firmware/qcom_scm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include <linux/reset-controller.h>
1818
#include <linux/arm-smccc.h>
1919

20+
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
2021
#include <asm/smp_plat.h>
22+
#endif
2123

2224
#include "qcom_scm.h"
2325

@@ -262,6 +264,7 @@ static bool __qcom_scm_is_call_available(struct device *dev, u32 svc_id,
262264
return ret ? false : !!res.result[0];
263265
}
264266

267+
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
265268
static int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,
266269
unsigned int flags)
267270
{
@@ -290,6 +293,13 @@ static int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,
290293

291294
return qcom_scm_call(__scm->dev, &desc, NULL);
292295
}
296+
#else
297+
static inline int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,
298+
unsigned int flags)
299+
{
300+
return -EINVAL;
301+
}
302+
#endif
293303

294304
static int __qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus)
295305
{

0 commit comments

Comments
 (0)