Re: [PATCH] remoteproc: qcom: fix glink dependencies
From: Alex Elder
Date: Thu Feb 04 2021 - 12:41:32 EST
On 2/4/21 11:16 AM, Arnd Bergmann wrote:
> On Thu, Feb 4, 2021 at 5:16 PM Alex Elder <elder@xxxxxxxxxx> wrote:
>>
>> On 2/4/21 9:40 AM, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@xxxxxxxx>
>>>
>>> Building the remoteproc drivers into the kernel while the qcom_glink
>>> code is in a loadable module results in a link error:
>>>
>>> ld.lld: error: undefined symbol: qcom_glink_ssr_notify
>>>>>> referenced by vmlinux.o:(glink_subdev_unprepare)
>>>
>>> Add a Kconfig dependency to avoid this.
>>
>> So if they're incompatible in that way it's declared in the
>> header but not defined in the kernel so the link fails.
>>
>> And at issue is anything that calls qcom_add_glink_subdev(),
>> which is qcom_q6v5_{adsp,mss,pas,wcss}.c, and those are
>> selected by CONFIG_QCOM_Q6V5_{ADSP,MSS,PAS,WCSS}.
>>
>> But I don't see why QCOM_WCNSS_PIL needs the dependency.
>>
>> Can you explain that? Other that that this looks good
>> to me (and I'll offer reviewed-by with your response).
>
> The problem is that QCOM_WCNSS_PIL selects
> QCOM_RPROC_COMMON, so qcom_common.o is built-in
> whenever QCOM_WCNSS_PIL=y, and this will lead to the
> same link failure, regardless of whether the function is needed
> or not.
Thanks for the explanation. Maybe that is something
than get fixed, maybe not.
Reviewed-by: Alex Elder <elder@xxxxxxxxxx>
> Arnd
>