summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-12 11:06:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-31 07:27:09 +0200
commit0d72bb853afc1076201ec705ce15662bddaf96af (patch)
treee6239e9947d070bf569fd2b41357a30cf2ee5427 /kernel/locking
parent6ecdcbcd309167884a5672e76d35bfb02595e046 (diff)
cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()
[ Upstream commit 752c2ea2d8e7c23b0f64e2e7d4337f3604d44c9f ] The cudbg_collect_mem_region() and cudbg_read_fw_mem() both use several hundred kilobytes of kernel stack space. One gets inlined into the other, which causes the stack usage to be combined beyond the warning limit when building with clang: drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:1057:12: error: stack frame size of 1244 bytes in function 'cudbg_collect_mem_region' [-Werror,-Wframe-larger-than=] Restructuring cudbg_collect_mem_region() lets clang do the same optimization that gcc does and reuse the stack slots as it can see that the large variables are never used together. A better fix might be to avoid using cudbg_meminfo on the stack altogether, but that requires a larger rewrite. Fixes: a1c69520f785 ("cxgb4: collect MC memory dump") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions