All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: fix linking against QMP
@ 2021-10-19 15:38 Arnd Bergmann
  2021-10-20  4:23 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-10-19 15:38 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier, Sibi Sankar,
	Stephen Boyd
  Cc: Arnd Bergmann, Peng Fan, linux-remoteproc, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

With QCOM_AOSS_QMP=m, the built-in q6v5 code fails to link:

ld.lld: error: undefined symbol: qmp_send
>>> referenced by qcom_q6v5.c
>>>               remoteproc/qcom_q6v5.o:(q6v5_load_state_toggle) in archive drivers/built-in.a

ld.lld: error: undefined symbol: qmp_get
>>> referenced by qcom_q6v5.c
>>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_init) in archive drivers/built-in.a

ld.lld: error: undefined symbol: qmp_put
>>> referenced by qcom_q6v5.c
>>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_init) in archive drivers/built-in.a
>>> referenced by qcom_q6v5.c
>>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_deinit) in archive drivers/built-in.a

Apparently it is meant to work without that code, so add
another hacky dependency to prevent the broken link, but
explicitly allow it to be built without QCOM_AOSS_QMP.

QCOM_Q6V5_COMMON is a hidden symbol, but add the dependency
there anyway to give a hint in case another user comes up and
misses gets this wrong again.

Fixes: c1fe10d238c0 ("remoteproc: qcom: q6v5: Use qmp_send to update co-processor load state")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/remoteproc/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index f2e961f998ca..d45e47b873b1 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -171,11 +171,13 @@ config QCOM_Q6V5_COMMON
 	tristate
 	depends on ARCH_QCOM
 	depends on QCOM_SMEM
+	depends on QCOM_AOSS_QMP || !QCOM_AOSS_QMP
 
 config QCOM_Q6V5_ADSP
 	tristate "Qualcomm Technology Inc ADSP Peripheral Image Loader"
 	depends on OF && ARCH_QCOM
 	depends on QCOM_SMEM
+	depends on QCOM_AOSS_QMP || !QCOM_AOSS_QMP
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
 	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
 	depends on QCOM_SYSMON || QCOM_SYSMON=n
@@ -198,6 +200,7 @@ config QCOM_Q6V5_MSS
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
 	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
 	depends on QCOM_SYSMON || QCOM_SYSMON=n
+	depends on QCOM_AOSS_QMP || !QCOM_AOSS_QMP
 	depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n
 	select MFD_SYSCON
 	select QCOM_MDT_LOADER
@@ -214,6 +217,7 @@ config QCOM_Q6V5_PAS
 	tristate "Qualcomm Hexagon v5 Peripheral Authentication Service support"
 	depends on OF && ARCH_QCOM
 	depends on QCOM_SMEM
+	depends on QCOM_AOSS_QMP || !QCOM_AOSS_QMP
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
 	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
 	depends on QCOM_SYSMON || QCOM_SYSMON=n
@@ -235,6 +239,7 @@ config QCOM_Q6V5_WCSS
 	tristate "Qualcomm Hexagon based WCSS Peripheral Image Loader"
 	depends on OF && ARCH_QCOM
 	depends on QCOM_SMEM
+	depends on QCOM_AOSS_QMP || !QCOM_AOSS_QMP
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
 	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
 	depends on QCOM_SYSMON || QCOM_SYSMON=n
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] remoteproc: fix linking against QMP
  2021-10-19 15:38 [PATCH] remoteproc: fix linking against QMP Arnd Bergmann
@ 2021-10-20  4:23 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2021-10-20  4:23 UTC (permalink / raw)
  To: Arnd Bergmann, Bjorn Andersson, Mathieu Poirier, Ohad Ben-Cohen,
	Sibi Sankar
  Cc: Arnd Bergmann, Peng Fan, linux-remoteproc, linux-kernel

Quoting Arnd Bergmann (2021-10-19 08:38:04)
> From: Arnd Bergmann <arnd@arndb.de>
>
> With QCOM_AOSS_QMP=m, the built-in q6v5 code fails to link:
>
> ld.lld: error: undefined symbol: qmp_send
> >>> referenced by qcom_q6v5.c
> >>>               remoteproc/qcom_q6v5.o:(q6v5_load_state_toggle) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: qmp_get
> >>> referenced by qcom_q6v5.c
> >>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_init) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: qmp_put
> >>> referenced by qcom_q6v5.c
> >>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_init) in archive drivers/built-in.a
> >>> referenced by qcom_q6v5.c
> >>>               remoteproc/qcom_q6v5.o:(qcom_q6v5_deinit) in archive drivers/built-in.a
>
> Apparently it is meant to work without that code, so add
> another hacky dependency to prevent the broken link, but
> explicitly allow it to be built without QCOM_AOSS_QMP.
>
> QCOM_Q6V5_COMMON is a hidden symbol, but add the dependency
> there anyway to give a hint in case another user comes up and
> misses gets this wrong again.
>
> Fixes: c1fe10d238c0 ("remoteproc: qcom: q6v5: Use qmp_send to update co-processor load state")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-20  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 15:38 [PATCH] remoteproc: fix linking against QMP Arnd Bergmann
2021-10-20  4:23 ` Stephen Boyd

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.