kernel_optimize_test/arch/mips/math-emu
Paul Burton 7d73d57211
MIPS: math-emu: Reuse name array in debugfs_fpuemu()
The FPU_STAT_CREATE_EX() macro used 114 times in debugfs_fpuemu()
declares a 32 byte char array to hold the name of a debugfs file. Since
each use of the macro declares a new char array out of the scope of all
the other uses, we end up with an unnecessarily large stack frame of
3648 bytes (ie. 114*32) plus the size of 2 pointers
(fpuemu_debugfs_base_dir & fpuemu_debugfs_inst_dir). This is enough to
trigger the frame size warnings from GCC in common configurations.

Avoid the unnecessary stack bloat by using a single name char array
which each usage of FPU_STAT_CREATE_EX() will reinitialize via the
strcpy() in adjust_instruction_counter_name().

Signed-off-by: Paul Burton <paulburton@kernel.org>
Reported-by: kbuild test robot <lkp@intel.com>
URL: https://lore.kernel.org/linux-mips/201911090929.xvXYuHUz%25lkp@intel.com/
2019-11-11 10:56:14 -08:00
..
cp1emu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_2008class.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
dp_add.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_cmp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_div.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_fint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_flong.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_fmax.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
dp_fmin.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
dp_fsp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_maddf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
dp_mul.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_rint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 309 2019-06-05 17:37:04 +02:00
dp_simple.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_sqrt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_sub.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_tint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dp_tlong.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
dsemul.c MIPS: math-emu: Write-protect delay slot emulation pages 2018-12-20 10:00:01 -08:00
ieee754.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754d.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754dp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754dp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754int.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754sp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
ieee754sp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
me-debugfs.c MIPS: math-emu: Reuse name array in debugfs_fpuemu() 2019-11-11 10:56:14 -08:00
sp_2008class.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
sp_add.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_cmp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_div.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_fdp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_fint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_flong.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_fmax.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
sp_fmin.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
sp_maddf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 454 2019-06-19 17:09:09 +02:00
sp_mul.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_rint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 309 2019-06-05 17:37:04 +02:00
sp_simple.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_sqrt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_sub.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_tint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00
sp_tlong.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 397 2019-06-05 17:37:12 +02:00