linux_dsm_epyc7002/drivers/net/wireless
Johannes Berg a59a7b96dc iwlwifi: pcie: reschedule in long-running memory reads
[ Upstream commit 3d372c4edfd4dffb7dea71c6b096fb414782b776 ]

If we spin for a long time in memory reads that (for some reason in
hardware) take a long time, then we'll eventually get messages such
as

  watchdog: BUG: soft lockup - CPU#2 stuck for 24s! [kworker/2:2:272]

This is because the reading really does take a very long time, and
we don't schedule, so we're hogging the CPU with this task, at least
if CONFIG_PREEMPT is not set, e.g. with CONFIG_PREEMPT_VOLUNTARY=y.

Previously I misinterpreted the situation and thought that this was
only going to happen if we had interrupts disabled, and then fixed
this (which is good anyway, however), but that didn't always help;
looking at it again now I realized that the spin unlock will only
reschedule if CONFIG_PREEMPT is used.

In order to avoid this issue, change the code to cond_resched() if
we've been spinning for too long here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 04516706bb ("iwlwifi: pcie: limit memory read spin time")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130253.217a9d6a6a12.If964cb582ab0aaa94e81c4ff3b279eaafda0fd3f@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-03 23:28:47 +01:00
..
admtek adm8211: fix error return code in adm8211_probe() 2020-12-30 11:53:40 +01:00
ath ath11k: qmi: try to allocate a big block of DMA memory first 2021-01-19 18:27:24 +01:00
atmel
broadcom brcmfmac: fix error return code in brcmf_cfg80211_connect() 2020-12-30 11:53:21 +01:00
cisco
intel iwlwifi: pcie: reschedule in long-running memory reads 2021-02-03 23:28:47 +01:00
intersil orinoco: Move context allocation after processing the skb 2020-12-30 11:53:21 +01:00
marvell mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start 2021-01-09 13:46:25 +01:00
mediatek mt7601u: fix rx buffer refcounting 2021-02-03 23:28:42 +01:00
microchip
quantenna qtnfmac: fix error return code in qtnf_pcie_probe() 2020-12-30 11:53:21 +01:00
ralink
realtek rtlwifi: rise completion at the last step of firmware callback 2021-01-12 20:18:26 +01:00
rsi rsi: fix error return code in rsi_reset_card() 2020-12-30 11:53:21 +01:00
st cw1200: fix missing destroy_workqueue() on error in cw1200_init_common 2020-12-30 11:53:21 +01:00
ti wl1251/wl12xx: fix a typo in comments 2020-09-29 11:24:58 +03:00
zydas net: zd1211rw: Remove ZD_ASSERT(in_interrupt()) 2020-09-29 14:02:54 -07:00
Kconfig
mac80211_hwsim.c genetlink: move to smaller ops wherever possible 2020-10-02 19:11:11 -07:00
mac80211_hwsim.h
Makefile
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
virt_wifi.c
wl3501_cs.c wl3501_cs: Remove unnecessary NULL check 2020-09-29 11:25:30 +03:00
wl3501.h