Search Linux Wireless

Re: [PATCH] wifi: ath12k: mark QMI driver event helpers as noinline

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

 



Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> writes:

> As described in [1], compiling the ath12k driver using clang with
> KASAN enabled warns about some functions with excessive stack usage,
> with the worst case being:
>
> drivers/net/wireless/ath/ath12k/qmi.c:3546:13: warning: stack frame size (2456) exceeds limit (1024) in 'ath12k_qmi_driver_event_work' [-Wframe-larger-than]
>
> Nathan [2] highlighted work done by Arnd [3] to address similar
> issues in other portions of the kernel.
>
> ath12k_qmi_driver_event_work() itself is a pretty lightweight
> function, but it dispatches to several other functions which do the
> real work:
> ath12k_qmi_driver_event_work()
> 	ath12k_qmi_event_server_arrive()
> 		ath12k_qmi_host_cap_send()
> 	ath12k_qmi_event_mem_request()
> 		ath12k_qmi_respond_fw_mem_request()
> 	ath12k_qmi_event_load_bdf()
> 		ath12k_qmi_request_target_cap()
> 		ath12k_qmi_load_bdf_qmi()
> 		ath12k_qmi_wlanfw_m3_info_send()
>
> Mark all of those underlying functions as 'noinline_for_stack' to
> prevent them from being inlined in ath12k_qmi_driver_event_work(),
> thereby eliminating the excessive stack usage.
>
> Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@xxxxxxxxxxx # [1]
> Link: https://msgid.link/20241025223321.GA3647469@thelio-3990X # [2]
> Link: https://lore.kernel.org/all/?q=f:arnd@xxxxxxxxxx+Wframe-larger-than # [3]
> Signed-off-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>

Acked-by: Kalle Valo <kvalo@xxxxxxxxxx>

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[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