Search Linux Wireless

Re: [PATCH] wifi: ath10k: fix QCOM_RPROC_COMMON dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 15, 2024 at 3:14 AM Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> wrote:
>
> On 5/14/2024 10:45 AM, Masahiro Yamada wrote:
> > On Tue, May 14, 2024 at 11:43 PM Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> wrote:
> >>
> >> On 5/11/2024 3:49 AM, Dmitry Baryshkov wrote:
> >>> If ath10k_snoc is built-in, while Qualcomm remoteprocs are built as
> >>> modules, compilation fails with:
> >>>
> >>> /usr/bin/aarch64-linux-gnu-ld: drivers/net/wireless/ath/ath10k/snoc.o: in function `ath10k_modem_init':
> >>> drivers/net/wireless/ath/ath10k/snoc.c:1534: undefined reference to `qcom_register_ssr_notifier'
> >>> /usr/bin/aarch64-linux-gnu-ld: drivers/net/wireless/ath/ath10k/snoc.o: in function `ath10k_modem_deinit':
> >>> drivers/net/wireless/ath/ath10k/snoc.c:1551: undefined reference to `qcom_unregister_ssr_notifier'
> >>>
> >>> Add corresponding dependency to ATH10K_SNOC Kconfig entry so that it's
> >>> built as module if QCOM_RPROC_COMMON is built as module too.
> >>>
> >>> Fixes: 747ff7d3d742 ("ath10k: Don't always treat modem stop events as crashes")
> >>> Cc: stable@xxxxxxxxxxxxxxx
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> >>> ---
> >>>  drivers/net/wireless/ath/ath10k/Kconfig | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
> >>> index e6ea884cafc1..4f385f4a8cef 100644
> >>> --- a/drivers/net/wireless/ath/ath10k/Kconfig
> >>> +++ b/drivers/net/wireless/ath/ath10k/Kconfig
> >>> @@ -45,6 +45,7 @@ config ATH10K_SNOC
> >>>       depends on ATH10K
> >>>       depends on ARCH_QCOM || COMPILE_TEST
> >>>       depends on QCOM_SMEM
> >>> +     depends on QCOM_RPROC_COMMON || QCOM_RPROC_COMMON=n
> >>>       select QCOM_SCM
> >>>       select QCOM_QMI_HELPERS
> >>>       help
> >>>
> >>> ---
> >>> base-commit: 75fa778d74b786a1608d55d655d42b480a6fa8bd
> >>> change-id: 20240511-ath10k-snoc-dep-862a9da2e6bb
> >>
> >> I see how this fixes the problem, but this doesn't seem like an ideal
> >> solution. The fact that the *_ssr_notifier() functions are correctly protected
> >> by conditional compilation ideally should mean that clients don't need to call
> >> call out this as a dependency. Otherwise, it would mean we'd need to do this
> >> for all feature flags.
> >
> >
> > It depends on if qcom_common.c is optional for ath10k_snoc.
> >
> > If it is optional, this patch is correct.
>
> At least from a build perspective it is optional



You need to make a decision from a run-time perspective
(that is, whether you are fine with having
ar_snoc->notifier == NULL)


If you are able to build the kernel successfully
but you get a run-time error (e.g. NULL pointer dereference),
it is even worse because run-time debugging is generally more
difficult than compile-time debugging.




-- 
Best Regards
Masahiro Yamada





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux