[radeon-alex:amd-staging-drm-next 12/15] drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:117:1: warning: the frame size of 1040 bytes is larger than 1024 bytes

Zhang, Hawking Hawking.Zhang at amd.com
Wed Nov 7 04:34:26 UTC 2018


Fixed and pushed. Thanks.

Regards,
Hawking

-----Original Message-----
From: kbuild test robot <lkp at intel.com> 
Sent: 2018年11月7日 5:20
To: Zhang, Hawking <Hawking.Zhang at amd.com>
Cc: kbuild-all at 01.org; dri-devel at lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher at amd.com>; Liu, Shaoyun <Shaoyun.Liu at amd.com>
Subject: [radeon-alex:amd-staging-drm-next 12/15] drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:117:1: warning: the frame size of 1040 bytes is larger than 1024 bytes

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   3902c0af567d658245ac01f2e33b39b2ff1ddd75
commit: 08dda26796ddd8a83e3b3568dc44e65a3108c56f [12/15] drm/amdgpu/psp: update topology info structures
config: i386-randconfig-s2-201844 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 08dda26796ddd8a83e3b3568dc44e65a3108c56f
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c: In function 'amdgpu_xgmi_add_device':
>> drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:117:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^

vim +117 drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c

230dee18 Shaoyun Liu   2018-06-27   63  
230dee18 Shaoyun Liu   2018-06-27   64  int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
230dee18 Shaoyun Liu   2018-06-27   65  {
08dda267 Hawking Zhang 2018-09-29   66  	struct psp_xgmi_topology_info tmp_topology;
230dee18 Shaoyun Liu   2018-06-27   67  	struct amdgpu_hive_info *hive;
230dee18 Shaoyun Liu   2018-06-27   68  	struct amdgpu_xgmi	*entry;
230dee18 Shaoyun Liu   2018-06-27   69  	struct amdgpu_device 	*tmp_adev;
230dee18 Shaoyun Liu   2018-06-27   70  
230dee18 Shaoyun Liu   2018-06-27   71  	int count = 0, ret = -EINVAL;
230dee18 Shaoyun Liu   2018-06-27   72  
230dee18 Shaoyun Liu   2018-06-27   73  	if ((adev->asic_type < CHIP_VEGA20) ||
230dee18 Shaoyun Liu   2018-06-27   74  		(adev->flags & AMD_IS_APU) )
230dee18 Shaoyun Liu   2018-06-27   75  		return 0;
4eb24be0 Hawking Zhang 2018-09-28   76  	adev->gmc.xgmi.node_id = psp_xgmi_get_node_id(&adev->psp);
230dee18 Shaoyun Liu   2018-06-27   77  	adev->gmc.xgmi.hive_id = psp_xgmi_get_hive_id(&adev->psp);
230dee18 Shaoyun Liu   2018-06-27   78  
08dda267 Hawking Zhang 2018-09-29   79  	memset(&tmp_topology, 0, sizeof(tmp_topology));
230dee18 Shaoyun Liu   2018-06-27   80  	mutex_lock(&xgmi_mutex);
230dee18 Shaoyun Liu   2018-06-27   81  	hive = amdgpu_get_xgmi_hive(adev);
230dee18 Shaoyun Liu   2018-06-27   82  	if (!hive)
230dee18 Shaoyun Liu   2018-06-27   83  		goto exit;
230dee18 Shaoyun Liu   2018-06-27   84  
230dee18 Shaoyun Liu   2018-06-27   85  	list_add_tail(&adev->gmc.xgmi.head, &hive->device_list);
230dee18 Shaoyun Liu   2018-06-27   86  	list_for_each_entry(entry, &hive->device_list, head)
08dda267 Hawking Zhang 2018-09-29   87  		tmp_topology.nodes[count++].node_id = entry->node_id;
230dee18 Shaoyun Liu   2018-06-27   88  
08dda267 Hawking Zhang 2018-09-29   89  	ret = psp_xgmi_get_topology_info(&adev->psp, count, &tmp_topology);
230dee18 Shaoyun Liu   2018-06-27   90  	if (ret) {
230dee18 Shaoyun Liu   2018-06-27   91  		dev_err(adev->dev,
230dee18 Shaoyun Liu   2018-06-27   92  			"XGMI: Get topology failure on device %llx, hive %llx, ret %d",
4eb24be0 Hawking Zhang 2018-09-28   93  			adev->gmc.xgmi.node_id,
230dee18 Shaoyun Liu   2018-06-27   94  			adev->gmc.xgmi.hive_id, ret);
230dee18 Shaoyun Liu   2018-06-27   95  		goto exit;
230dee18 Shaoyun Liu   2018-06-27   96  	}
230dee18 Shaoyun Liu   2018-06-27   97  	/* Each psp need to set the latest topology */
230dee18 Shaoyun Liu   2018-06-27   98  	list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
08dda267 Hawking Zhang 2018-09-29   99  		ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, &tmp_topology);
230dee18 Shaoyun Liu   2018-06-27  100  		if (ret) {
230dee18 Shaoyun Liu   2018-06-27  101  			dev_err(tmp_adev->dev,
230dee18 Shaoyun Liu   2018-06-27  102  				"XGMI: Set topology failure on device %llx, hive %llx, ret %d",
4eb24be0 Hawking Zhang 2018-09-28  103  				tmp_adev->gmc.xgmi.node_id,
230dee18 Shaoyun Liu   2018-06-27  104  				tmp_adev->gmc.xgmi.hive_id, ret);
230dee18 Shaoyun Liu   2018-06-27  105  			/* To do : continue with some  node failed or disable the  whole  hive */
230dee18 Shaoyun Liu   2018-06-27  106  			break;
230dee18 Shaoyun Liu   2018-06-27  107  		}
230dee18 Shaoyun Liu   2018-06-27  108  	}
230dee18 Shaoyun Liu   2018-06-27  109  	if (!ret)
230dee18 Shaoyun Liu   2018-06-27  110  		dev_info(adev->dev, "XGMI: Add node %d to hive 0x%llx.\n",
230dee18 Shaoyun Liu   2018-06-27  111  			adev->gmc.xgmi.physical_node_id,
230dee18 Shaoyun Liu   2018-06-27  112  			adev->gmc.xgmi.hive_id);
230dee18 Shaoyun Liu   2018-06-27  113  
230dee18 Shaoyun Liu   2018-06-27  114  exit:
230dee18 Shaoyun Liu   2018-06-27  115  	mutex_unlock(&xgmi_mutex);
230dee18 Shaoyun Liu   2018-06-27  116  	return ret;
230dee18 Shaoyun Liu   2018-06-27 @117  }

:::::: The code at line 117 was first introduced by commit
:::::: 230dee1859d07cc77c38add73482c07f899c744e drm/amdgpu : Generate XGMI topology info from driver level

:::::: TO: Shaoyun Liu <Shaoyun.Liu at amd.com>
:::::: CC: shaoyunl <Shaoyun.Liu at amd.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the dri-devel mailing list