Skip to content

Commit eee412e

Browse files
rddunlapandersson
authored andcommitted
remoteproc: qcom: q6v5: fix service routines build errors
When CONFIG_QCOM_AOSS_QMP=m and CONFIG_QCOM_Q6V5_MSS=y, the builtin driver cannot call into the loadable module's low-level service functions. Trying to build with that config combo causes linker errors. There are two problems here. First, drivers/remoteproc/qcom_q6v5.c should #include <linux/soc/qcom/qcom_aoss.h> for the definitions of the service functions, depending on whether CONFIG_QCOM_AOSS_QMP is set/enabled or not. Second, the qcom remoteproc drivers should depend on QCOM_AOSS_QMP iff it is enabled (=y or =m) so that the qcom remoteproc drivers can be built properly. This prevents these build errors: aarch64-linux-ld: drivers/remoteproc/qcom_q6v5.o: in function `q6v5_load_state_toggle': qcom_q6v5.c:(.text+0xc4): undefined reference to `qmp_send' aarch64-linux-ld: drivers/remoteproc/qcom_q6v5.o: in function `qcom_q6v5_deinit': (.text+0x2e4): undefined reference to `qmp_put' aarch64-linux-ld: drivers/remoteproc/qcom_q6v5.o: in function `qcom_q6v5_init': (.text+0x778): undefined reference to `qmp_get' aarch64-linux-ld: (.text+0x7d8): undefined reference to `qmp_put' Fixes: c1fe10d ("remoteproc: qcom: q6v5: Use qmp_send to update co-processor load state") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kernel test robot <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: [email protected] Cc: Sibi Sankar <[email protected]> Cc: Stephen Boyd <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cfcabbb commit eee412e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/remoteproc/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ config QCOM_Q6V5_ADSP
180180
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
181181
depends on QCOM_SYSMON || QCOM_SYSMON=n
182182
depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n
183+
depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
183184
select MFD_SYSCON
184185
select QCOM_PIL_INFO
185186
select QCOM_MDT_LOADER
@@ -199,6 +200,7 @@ config QCOM_Q6V5_MSS
199200
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
200201
depends on QCOM_SYSMON || QCOM_SYSMON=n
201202
depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n
203+
depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
202204
select MFD_SYSCON
203205
select QCOM_MDT_LOADER
204206
select QCOM_PIL_INFO
@@ -218,6 +220,7 @@ config QCOM_Q6V5_PAS
218220
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
219221
depends on QCOM_SYSMON || QCOM_SYSMON=n
220222
depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n
223+
depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
221224
select MFD_SYSCON
222225
select QCOM_PIL_INFO
223226
select QCOM_MDT_LOADER
@@ -239,6 +242,7 @@ config QCOM_Q6V5_WCSS
239242
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
240243
depends on QCOM_SYSMON || QCOM_SYSMON=n
241244
depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n
245+
depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
242246
select MFD_SYSCON
243247
select QCOM_MDT_LOADER
244248
select QCOM_PIL_INFO

drivers/remoteproc/qcom_q6v5.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/platform_device.h>
1111
#include <linux/interrupt.h>
1212
#include <linux/module.h>
13+
#include <linux/soc/qcom/qcom_aoss.h>
1314
#include <linux/soc/qcom/smem.h>
1415
#include <linux/soc/qcom/smem_state.h>
1516
#include <linux/remoteproc.h>

0 commit comments

Comments
 (0)