]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: iwlwifi: fw: allocate chained SG tables for dump
authorJohannes Berg <johannes.berg@intel.com>
Sun, 9 Feb 2025 12:34:45 +0000 (14:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:37:36 +0000 (14:37 +0200)
commitaadb8a9a90c0502f7d8119090bc57d2a6cd5eb17
tree6bfc0dfdeb183dc60cee88cffb095b9dcbc90f6b
parenta3160e7f6d9080acdeae9b0ea638e993c5b89f5d
wifi: iwlwifi: fw: allocate chained SG tables for dump

[ Upstream commit 7774e3920029398ad49dc848b23840593f14d515 ]

The firmware dumps can be pretty big, and since we use single
pages for each SG table entry, even the table itself may end
up being an order-5 allocation. Build chained tables so that
we need not allocate a higher-order table here.

This could be improved and cleaned up, e.g. by using the SG
pool code or simply kvmalloc(), but all of that would require
also updating the devcoredump first since that frees it all,
so we need to be more careful. SG pool might also run against
the CONFIG_ARCH_NO_SG_CHAIN limitation, which is irrelevant
here.

Also use _devcd_free_sgtable() for the error paths now, much
simpler especially since it's in two places now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250209143303.697c7a465ac9.Iea982df46b5c075bfb77ade36f187d99a70c63db@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c