]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath11k: mark ath11k_wow_convert_8023_to_80211() as noinline
authorJeff Johnson <quic_jjohnson@quicinc.com>
Tue, 19 Nov 2024 15:47:40 +0000 (07:47 -0800)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Thu, 21 Nov 2024 15:59:49 +0000 (07:59 -0800)
commit4ba72ff2919cad90e1963b708ce23b92120613ff
tree21ce61e01d380ce9c3791306a8cd3c1806e87d7a
parent500d7ec88652ba7316e7fba334754e39e3177e4a
wifi: ath11k: mark ath11k_wow_convert_8023_to_80211() as noinline

When compiling the ath11k driver using clang with KASAN enabled, the
following warning is observed:

drivers/net/wireless/ath/ath11k/wow.c:672:5: warning: stack frame size (1336) exceeds limit (1024) in 'ath11k_wow_op_suspend' [-Wframe-larger-than]

This is similar to the issue found in ath12k/qmi.c that was discussed
in [1] and fixed with [2]. The issue is that clang inlining can
explode stack usage.

ath11k_wow_op_suspend() itself is a pretty lightweight function, but
it dispatches to several other functions which do the real work. One
path in particular is:

ath11k_wow_op_suspend()
ath11k_wow_set_wakeups()
ath11k_vif_wow_set_wakeups()
ath11k_wow_convert_8023_to_80211()

Of these, ath11k_wow_convert_8023_to_80211() has non-trivial stack
usage, so mark it as 'noinline_for_stack' to prevent it from being
inlined in ath11k_wow_op_suspend(), thereby eliminating the excessive
stack usage.

Compile tested only.

Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com
Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241119-ath11k-noinline-v1-3-4ec0a8aa30b2@quicinc.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath11k/wow.c