diff options
author | Paul Burton <paulburton@kernel.org> | 2019-11-11 19:50:59 +0100 |
---|---|---|
committer | Paul Burton <paulburton@kernel.org> | 2019-11-11 19:56:14 +0100 |
commit | 7d73d572111ff585b953b88be4edaf2769bc017e (patch) | |
tree | 32cbd4ed9297171d3fab1429f4159ae0014b2a12 /arch/mips/include/asm/pgtable-64.h | |
parent | MIPS: allow building with kcov coverage (diff) | |
download | linux-7d73d572111ff585b953b88be4edaf2769bc017e.tar.xz linux-7d73d572111ff585b953b88be4edaf2769bc017e.zip |
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/
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions