From: kernel test robot <lkp@intel.com>
To: Dominik Kaszewski <dominik.kaszewski@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Chen-Yu Chen" <Chen-Yu.Chen@amd.com>,
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Subject: [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'
Date: Wed, 23 Sep 2026 01:02:41 +0800 [thread overview]
Message-ID: <202609230057.SPRTbGh9-lkp@intel.com> (raw)
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
reply other threads:[~2026-09-22 17:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609230057.SPRTbGh9-lkp@intel.com \
--to=lkp@intel.com \
--cc=Chen-Yu.Chen@amd.com \
--cc=dominik.kaszewski@amd.com \
--cc=llvm@lists.linux.dev \
--cc=nicholas.kazlauskas@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox