Quoting Randy Dunlap (2022-01-14 17:13:38) > 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: c1fe10d238c0 ("remoteproc: qcom: q6v5: Use qmp_send to update co-processor load state") > Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Reported-by: kernel test robot <lkp@xxxxxxxxx> > Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> > Cc: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> > Cc: linux-remoteproc@xxxxxxxxxxxxxxx > Cc: Sibi Sankar <sibis@xxxxxxxxxxxxxx> > Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx> > --- Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>