Skip to content

Commit

Permalink
firmware: qcom: scm: Don't break compile test on non-ARM platforms
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
andersson committed Oct 25, 2021
1 parent e1b391e commit c50031f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/firmware/qcom_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <linux/reset-controller.h>
#include <linux/arm-smccc.h>

#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#include <asm/smp_plat.h>
#endif

#include "qcom_scm.h"

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

#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
static int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,
unsigned int flags)
{
Expand Down Expand Up @@ -290,6 +293,13 @@ static int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,

return qcom_scm_call(__scm->dev, &desc, NULL);
}
#else
static inline int __qcom_scm_set_boot_addr_mc(void *entry, const cpumask_t *cpus,
unsigned int flags)
{
return -EINVAL;
}
#endif

static int __qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus)
{
Expand Down

0 comments on commit c50031f

Please sign in to comment.