When CONFIG_QCOM_Q6V5_COMMON=y and CONFIG_QCOM_AOSS_QMP=m, there are linker errors: aarch64-linux-ld: drivers/remoteproc/qcom_q6v5.o: in function `q6v5_load_state_toggle': qcom_q6v5.c:(.text+0xac): undefined reference to `qmp_send' qcom_q6v5.c:(.text+0xac): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qmp_send' aarch64-linux-ld: drivers/remoteproc/qcom_q6v5.o: in function `qcom_q6v5_deinit': (.text+0x204): undefined reference to `qmp_put' (.text+0x204): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qmp_put' Fix these by requiring QCOM_Q6V5 symbols to be modular (=m) when QCOM_AOSS_QMP=m. Fixes: c1fe10d238c0 ("remoteproc: qcom: q6v5: Use qmp_send to update co-processor load state") Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Sibi Sankar <sibis@xxxxxxxxxxxxxx> Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx> Cc: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> Cc: Ohad Ben-Cohen <ohad@xxxxxxxxxx> Cc: linux-remoteproc@xxxxxxxxxxxxxxx --- drivers/remoteproc/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) --- next-2021-1210.orig/drivers/remoteproc/Kconfig +++ next-2021-1210/drivers/remoteproc/Kconfig @@ -176,6 +176,7 @@ 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 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 @@ -195,6 +196,7 @@ config QCOM_Q6V5_MSS tristate "Qualcomm Hexagon V5 self-authenticating modem subsystem support" depends on OF && ARCH_QCOM depends on QCOM_SMEM + depends on 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 @@ -214,6 +216,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 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 +238,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 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