mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fix stack frame size warning
When building NVGPU for Linux kernels where the CONFIG_FRAME_WARN is set
to 1024, the following build error is observed ...
drivers/gpu/nvgpu/common/init/nvgpu_init.c: In function
‘nvgpu_finalize_poweron’:
drivers/gpu/nvgpu/common/init/nvgpu_init.c:773:1: error: the frame size
of 1280 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
The problem is that nvgpu_finalize_poweron() function defines a large
table of function pointers, nvgpu_init_table, and cannot be declared
statically. To allow NVGPU to be compiled for Linux kernels that by
default warn if the stack frame size exceeds 1024, always set the
-Wframe-larger-than to 2048 for NVGPU.
Bug 200689205
Change-Id: I59b202801a9e5fecda1a9a166cddf54775131dbe
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2465820
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
849433f66c
commit
e7226ccb1b
@@ -7,6 +7,7 @@ ccflags-y += -I$(srctree.nvgpu)/include/uapi
|
||||
|
||||
ccflags-y += -I$(srctree)/drivers/devfreq
|
||||
|
||||
ccflags-y += -Wframe-larger-than=2048
|
||||
ccflags-y += -Wno-multichar
|
||||
ccflags-y += -Werror
|
||||
ccflags-y += -Wno-error=cpp
|
||||
|
||||
Reference in New Issue
Block a user