* [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms
@ 2021-10-25 2:58 Bjorn Andersson
2021-10-25 6:24 ` Stephan Gerhold
2021-10-25 20:20 ` patchwork-bot+linux-arm-msm
0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2021-10-25 2:58 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Stephan Gerhold; +Cc: linux-arm-msm, linux-kernel
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: 55845f46df03 ("firmware: qcom: scm: Add support for MC boot address API")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/firmware/qcom_scm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index 7dd9e5e10f23..11464f6502be 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -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"
@@ -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)
{
@@ -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)
{
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms
2021-10-25 2:58 [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms Bjorn Andersson
@ 2021-10-25 6:24 ` Stephan Gerhold
2021-10-25 20:20 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Gerhold @ 2021-10-25 6:24 UTC (permalink / raw)
To: Bjorn Andersson; +Cc: Andy Gross, linux-arm-msm, linux-kernel
On Sun, Oct 24, 2021 at 07:58:16PM -0700, Bjorn Andersson wrote:
> 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: 55845f46df03 ("firmware: qcom: scm: Add support for MC boot address API")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Sorry about this, I have to say I'm rather surprised that qcom_scm can
be compiled at all on x86_64. It's just a wrapper around ARM SMCs that
don't exist on x86_64 either. :D
But knowing how quickly qcom_scm causes compile problems on random
kernel configurations I'm not going to suggest changing that...
So, this looks good to me. Thanks for fixing it. :)
> ---
> drivers/firmware/qcom_scm.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index 7dd9e5e10f23..11464f6502be 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -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"
>
> @@ -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)
> {
> @@ -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)
> {
> --
> 2.29.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms
2021-10-25 2:58 [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms Bjorn Andersson
2021-10-25 6:24 ` Stephan Gerhold
@ 2021-10-25 20:20 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-10-25 20:20 UTC (permalink / raw)
To: Bjorn Andersson; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (for-next)
by Bjorn Andersson <bjorn.andersson@linaro.org>:
On Sun, 24 Oct 2021 19:58:16 -0700 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- firmware: qcom: scm: Don't break compile test on non-ARM platforms
https://git.kernel.org/qcom/c/c50031f03dfe
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 2:58 [PATCH] firmware: qcom: scm: Don't break compile test on non-ARM platforms Bjorn Andersson
2021-10-25 6:24 ` Stephan Gerhold
2021-10-25 20:20 ` patchwork-bot+linux-arm-msm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.