drivers/gpu/drm/amd/amdgpu/aldebaran.c:317:1: warning: stack frame size of 2624 bytes in function 'aldebaran_mode2_restore_hwcontext'

From: kernel test robot
Date: Wed May 05 2021 - 11:56:58 EST


Hi Lijo,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d665ea6ea86c785760ee4bad4543dab3267ad074
commit: 142600e854b17f7dac25c8f971c030bb1700d2b6 drm/amdgpu: Add mode2 reset support for aldebaran
date: 4 weeks ago
config: powerpc-randconfig-r016-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=142600e854b17f7dac25c8f971c030bb1700d2b6
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 142600e854b17f7dac25c8f971c030bb1700d2b6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/amd/amdgpu/aldebaran.c:25:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_reset.h:24:9: warning: '__AMDUGPU_RESET_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]
#ifndef __AMDUGPU_RESET_H__
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_reset.h:25:9: note: '__AMDGPU_RESET_H__' is defined here; did you mean '__AMDUGPU_RESET_H__'?
#define __AMDGPU_RESET_H__
^~~~~~~~~~~~~~~~~~
__AMDUGPU_RESET_H__
drivers/gpu/drm/amd/amdgpu/aldebaran.c:110:6: warning: no previous prototype for function 'aldebaran_async_reset' [-Wmissing-prototypes]
void aldebaran_async_reset(struct work_struct *work)
^
drivers/gpu/drm/amd/amdgpu/aldebaran.c:110:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void aldebaran_async_reset(struct work_struct *work)
^
static
>> drivers/gpu/drm/amd/amdgpu/aldebaran.c:317:1: warning: stack frame size of 2624 bytes in function 'aldebaran_mode2_restore_hwcontext' [-Wframe-larger-than=]
aldebaran_mode2_restore_hwcontext(struct amdgpu_reset_control *reset_ctl,
^
3 warnings generated.


vim +/aldebaran_mode2_restore_hwcontext +317 drivers/gpu/drm/amd/amdgpu/aldebaran.c

315
316 static int
> 317 aldebaran_mode2_restore_hwcontext(struct amdgpu_reset_control *reset_ctl,
318 struct amdgpu_reset_context *reset_context)
319 {
320 int r;
321 struct amdgpu_device *tmp_adev = NULL;
322
323 if (reset_context->hive == NULL) {
324 /* Wrong context, return error */
325 return -EINVAL;
326 }
327
328 list_for_each_entry(tmp_adev, &reset_context->hive->device_list,
329 gmc.xgmi.head) {
330 dev_info(tmp_adev->dev,
331 "GPU reset succeeded, trying to resume\n");
332 r = aldebaran_mode2_restore_ip(tmp_adev);
333 if (r)
334 goto end;
335
336 /*
337 * Add this ASIC as tracked as reset was already
338 * complete successfully.
339 */
340 amdgpu_register_gpu_instance(tmp_adev);
341
342 /* Resume RAS */
343 amdgpu_ras_resume(tmp_adev);
344
345 /* Update PSP FW topology after reset */
346 if (reset_context->hive &&
347 tmp_adev->gmc.xgmi.num_physical_nodes > 1)
348 r = amdgpu_xgmi_update_topology(reset_context->hive,
349 tmp_adev);
350
351 if (!r) {
352 amdgpu_irq_gpu_reset_resume_helper(tmp_adev);
353
354 r = amdgpu_ib_ring_tests(tmp_adev);
355 if (r) {
356 dev_err(tmp_adev->dev,
357 "ib ring test failed (%d).\n", r);
358 r = -EAGAIN;
359 tmp_adev->asic_reset_res = r;
360 goto end;
361 }
362 }
363 }
364
365 end:
366 return r;
367 }
368

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip