All of lore.kernel.org
 help / color / mirror / Atom feed
* [drm-amdgpu:drm-amdgpu-next 47/114] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c:87:37: warning: stack frame size (32912) exceeds limit (2048) in 'dc_memory_pool_create'
@ 2026-09-23 17:17 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-23 17:17 UTC (permalink / raw)
  To: Dominik Kaszewski
  Cc: oe-kbuild-all, Alex Deucher, Nicholas Kazlauskas, Chenyu Chen

tree:   https://gitlab.freedesktop.org/drm/amdgpu/kernel drm-amdgpu-next
head:   cf48bd0a46279f4607956cb17c71bda96ee802e3
commit: 6f74688d7e2377e253671d36acd63a988186216b [47/114] drm/amd/display: Add lock-free memory pool
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20260923/202609231919.tiTCav93-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260923/202609231919.tiTCav93-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/202609231919.tiTCav93-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 (32912) 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-23 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 17:17 [drm-amdgpu:drm-amdgpu-next 47/114] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_memory_pool.c:87:37: warning: stack frame size (32912) exceeds limit (2048) in 'dc_memory_pool_create' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.