* [agd5f:amd-staging-drm-next 3081/3178] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c:87:37: warning: stack frame size (16560) exceeds limit (2048) in 'dc_memory_pool_create'
@ 2026-09-22 17:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-22 17:02 UTC (permalink / raw)
To: Dominik Kaszewski; +Cc: llvm, oe-kbuild-all, Chen-Yu Chen, Nicholas Kazlauskas
tree: https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head: e0e9c2257911b291ef5345635a9e6dfef5b2b424
commit: 68006eb4b8f03d723aaa66e87625795189488c04 [3081/3178] drm/amd/display: Add lock-free memory pool
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260923/202609230057.SPRTbGh9-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260923/202609230057.SPRTbGh9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609230057.SPRTbGh9-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c:87:37: warning: stack frame size (16560) exceeds limit (2048) in 'dc_memory_pool_create' [-Wframe-larger-than]
87 | __must_check struct dc_memory_pool *dc_memory_pool_create(size_t size,
| ^
1 warning generated.
vim +/dc_memory_pool_create +87 drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c
86
> 87 __must_check struct dc_memory_pool *dc_memory_pool_create(size_t size,
88 size_t capacity)
89 {
90 if (!size || !capacity)
91 return NULL;
92
93 // Limited by split between size and generation in index_t
94 if (capacity >= (uint32_t)-DC_MEMORY_POOL_ENUM_SIZE)
95 return NULL;
96
97 // uint32_t because that's what alloc functions take
98 const uint32_t block_pages = (uint32_t)size_in_pages(size);
99 const uint32_t lines = (uint32_t)capacity * block_pages;
100 const uint32_t padded_struct_size =
101 sizeof(struct dc_memory_pool) + PAGE_SIZE;
102
103 void *unaligned_pool = kzalloc(padded_struct_size, GFP_KERNEL);
104
105 if (!unaligned_pool)
106 return NULL;
107
108 struct dc_memory_pool *pool = page_align_up(unaligned_pool);
109
110 *pool = (struct dc_memory_pool){
111 .size = size,
112 .capacity = capacity,
113 .unaligned_pool = unaligned_pool,
114 .unaligned_memory = kcalloc(lines + 1, PAGE_SIZE, GFP_KERNEL),
115 .free_list = kcalloc((uint32_t)capacity, sizeof(atomic_t),
116 GFP_KERNEL),
117 .free_head = ATOMIC_INIT(0),
118 };
119 pool->memory = page_align_up(pool->unaligned_memory);
120
121 if (!pool->unaligned_memory || !pool->free_list) {
122 dc_memory_pool_destroy(pool);
123 return NULL;
124 }
125
126 for (int32_t i = 0; i < (int32_t)capacity; i++)
127 atomic_set_release(&pool->free_list[i], i + 1);
128
129 atomic_set_release(&pool->free_list[capacity - 1],
130 DC_MEMORY_POOL_SENTINEL);
131
132 return pool;
133 }
134
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-22 17:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 17:02 [agd5f:amd-staging-drm-next 3081/3178] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c:87:37: warning: stack frame size (16560) exceeds limit (2048) in 'dc_memory_pool_create' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox