wifi: ath12k: mark QMI driver event helpers as noinline
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@quicinc.com
Link: https://msgid.link/20241025223321.GA3647469@thelio-3990X
Link: https://lore.kernel.org/all/?q=f:arnd@kernel.org+Wframe-larger-than
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>