* [linux-next:master 13765/14098] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1170:22: warning: variable 'bo_va' set but not used
@ 2021-07-01 23:08 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-01 23:08 UTC (permalink / raw)
To: Alex Sierra
Cc: kbuild-all, Linux Memory Management List, Alex Deucher, Felix Kuehling
[-- Attachment #1: Type: text/plain, Size: 6894 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb0ca446157a86b75502c1636b0d81e642fe6bf1
commit: 6c1ce701601b3bec30d8505183ddeba1ad71d889 [13765/14098] drm/amdkfd: classify and map mixed svm range pages in GPU
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6c1ce701601b3bec30d8505183ddeba1ad71d889
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 6c1ce701601b3bec30d8505183ddeba1ad71d889
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c: In function 'svm_range_map_to_gpu':
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1170:22: warning: variable 'bo_va' set but not used [-Wunused-but-set-variable]
1170 | struct amdgpu_bo_va bo_va;
| ^~~~~
vim +/bo_va +1170 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c
f80fe9d3c1149b Felix Kuehling 2021-02-24 1164
f80fe9d3c1149b Felix Kuehling 2021-02-24 1165 static int
f80fe9d3c1149b Felix Kuehling 2021-02-24 1166 svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1167 struct svm_range *prange, dma_addr_t *dma_addr,
b53fa124acdcec Philip Yang 2020-06-23 1168 struct amdgpu_device *bo_adev, struct dma_fence **fence)
f80fe9d3c1149b Felix Kuehling 2021-02-24 1169 {
b53fa124acdcec Philip Yang 2020-06-23 @1170 struct amdgpu_bo_va bo_va;
bf546940d5aa15 Philip Yang 2021-05-12 1171 bool table_freed = false;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1172 uint64_t pte_flags;
6c1ce701601b3b Alex Sierra 2021-05-05 1173 unsigned long last_start;
6c1ce701601b3b Alex Sierra 2021-05-05 1174 int last_domain;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1175 int r = 0;
6c1ce701601b3b Alex Sierra 2021-05-05 1176 int64_t i;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1177
f80fe9d3c1149b Felix Kuehling 2021-02-24 1178 pr_debug("svms 0x%p [0x%lx 0x%lx]\n", prange->svms, prange->start,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1179 prange->last);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1180
6c1ce701601b3b Alex Sierra 2021-05-05 1181 if (prange->svm_bo && prange->ttm_res)
b53fa124acdcec Philip Yang 2020-06-23 1182 bo_va.is_xgmi = amdgpu_xgmi_same_hive(adev, bo_adev);
b53fa124acdcec Philip Yang 2020-06-23 1183
6c1ce701601b3b Alex Sierra 2021-05-05 1184 last_start = prange->start;
6c1ce701601b3b Alex Sierra 2021-05-05 1185 for (i = 0; i < prange->npages; i++) {
6c1ce701601b3b Alex Sierra 2021-05-05 1186 last_domain = dma_addr[i] & SVM_RANGE_VRAM_DOMAIN;
6c1ce701601b3b Alex Sierra 2021-05-05 1187 dma_addr[i] &= ~SVM_RANGE_VRAM_DOMAIN;
6c1ce701601b3b Alex Sierra 2021-05-05 1188 if ((prange->start + i) < prange->last &&
6c1ce701601b3b Alex Sierra 2021-05-05 1189 last_domain == (dma_addr[i + 1] & SVM_RANGE_VRAM_DOMAIN))
6c1ce701601b3b Alex Sierra 2021-05-05 1190 continue;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1191
6c1ce701601b3b Alex Sierra 2021-05-05 1192 pr_debug("Mapping range [0x%lx 0x%llx] on domain: %s\n",
6c1ce701601b3b Alex Sierra 2021-05-05 1193 last_start, prange->start + i, last_domain ? "GPU" : "CPU");
6c1ce701601b3b Alex Sierra 2021-05-05 1194 pte_flags = svm_range_get_pte_flags(adev, prange, last_domain);
b53fa124acdcec Philip Yang 2020-06-23 1195 r = amdgpu_vm_bo_update_mapping(adev, bo_adev, vm, false, false, NULL,
6c1ce701601b3b Alex Sierra 2021-05-05 1196 last_start,
6c1ce701601b3b Alex Sierra 2021-05-05 1197 prange->start + i, pte_flags,
6c1ce701601b3b Alex Sierra 2021-05-05 1198 last_start - prange->start,
6c1ce701601b3b Alex Sierra 2021-05-05 1199 NULL,
6c1ce701601b3b Alex Sierra 2021-05-05 1200 dma_addr,
6c1ce701601b3b Alex Sierra 2021-05-05 1201 &vm->last_update,
bf546940d5aa15 Philip Yang 2021-05-12 1202 &table_freed);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1203 if (r) {
f80fe9d3c1149b Felix Kuehling 2021-02-24 1204 pr_debug("failed %d to map to gpu 0x%lx\n", r, prange->start);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1205 goto out;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1206 }
6c1ce701601b3b Alex Sierra 2021-05-05 1207 last_start = prange->start + i + 1;
6c1ce701601b3b Alex Sierra 2021-05-05 1208 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1209
f80fe9d3c1149b Felix Kuehling 2021-02-24 1210 r = amdgpu_vm_update_pdes(adev, vm, false);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1211 if (r) {
f80fe9d3c1149b Felix Kuehling 2021-02-24 1212 pr_debug("failed %d to update directories 0x%lx\n", r,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1213 prange->start);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1214 goto out;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1215 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1216
f80fe9d3c1149b Felix Kuehling 2021-02-24 1217 if (fence)
f80fe9d3c1149b Felix Kuehling 2021-02-24 1218 *fence = dma_fence_get(vm->last_update);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1219
bf546940d5aa15 Philip Yang 2021-05-12 1220 if (table_freed) {
bf546940d5aa15 Philip Yang 2021-05-12 1221 struct kfd_process *p;
bf546940d5aa15 Philip Yang 2021-05-12 1222
bf546940d5aa15 Philip Yang 2021-05-12 1223 p = container_of(prange->svms, struct kfd_process, svms);
bf546940d5aa15 Philip Yang 2021-05-12 1224 amdgpu_amdkfd_flush_gpu_tlb_pasid((struct kgd_dev *)adev,
765385ec00a943 Philip Yang 2021-05-13 1225 p->pasid, TLB_FLUSH_LEGACY);
bf546940d5aa15 Philip Yang 2021-05-12 1226 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1227 out:
f80fe9d3c1149b Felix Kuehling 2021-02-24 1228 return r;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1229 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1230
:::::: The code at line 1170 was first introduced by commit
:::::: b53fa124acdcec6d05bcdb36b55bf0f84471b1b7 drm/amdkfd: support xgmi same hive mapping
:::::: TO: Philip Yang <Philip.Yang@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 77727 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [linux-next:master 13765/14098] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1170:22: warning: variable 'bo_va' set but not used
@ 2021-07-01 23:08 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-01 23:08 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7001 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb0ca446157a86b75502c1636b0d81e642fe6bf1
commit: 6c1ce701601b3bec30d8505183ddeba1ad71d889 [13765/14098] drm/amdkfd: classify and map mixed svm range pages in GPU
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6c1ce701601b3bec30d8505183ddeba1ad71d889
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 6c1ce701601b3bec30d8505183ddeba1ad71d889
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c: In function 'svm_range_map_to_gpu':
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1170:22: warning: variable 'bo_va' set but not used [-Wunused-but-set-variable]
1170 | struct amdgpu_bo_va bo_va;
| ^~~~~
vim +/bo_va +1170 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c
f80fe9d3c1149b Felix Kuehling 2021-02-24 1164
f80fe9d3c1149b Felix Kuehling 2021-02-24 1165 static int
f80fe9d3c1149b Felix Kuehling 2021-02-24 1166 svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1167 struct svm_range *prange, dma_addr_t *dma_addr,
b53fa124acdcec Philip Yang 2020-06-23 1168 struct amdgpu_device *bo_adev, struct dma_fence **fence)
f80fe9d3c1149b Felix Kuehling 2021-02-24 1169 {
b53fa124acdcec Philip Yang 2020-06-23 @1170 struct amdgpu_bo_va bo_va;
bf546940d5aa15 Philip Yang 2021-05-12 1171 bool table_freed = false;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1172 uint64_t pte_flags;
6c1ce701601b3b Alex Sierra 2021-05-05 1173 unsigned long last_start;
6c1ce701601b3b Alex Sierra 2021-05-05 1174 int last_domain;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1175 int r = 0;
6c1ce701601b3b Alex Sierra 2021-05-05 1176 int64_t i;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1177
f80fe9d3c1149b Felix Kuehling 2021-02-24 1178 pr_debug("svms 0x%p [0x%lx 0x%lx]\n", prange->svms, prange->start,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1179 prange->last);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1180
6c1ce701601b3b Alex Sierra 2021-05-05 1181 if (prange->svm_bo && prange->ttm_res)
b53fa124acdcec Philip Yang 2020-06-23 1182 bo_va.is_xgmi = amdgpu_xgmi_same_hive(adev, bo_adev);
b53fa124acdcec Philip Yang 2020-06-23 1183
6c1ce701601b3b Alex Sierra 2021-05-05 1184 last_start = prange->start;
6c1ce701601b3b Alex Sierra 2021-05-05 1185 for (i = 0; i < prange->npages; i++) {
6c1ce701601b3b Alex Sierra 2021-05-05 1186 last_domain = dma_addr[i] & SVM_RANGE_VRAM_DOMAIN;
6c1ce701601b3b Alex Sierra 2021-05-05 1187 dma_addr[i] &= ~SVM_RANGE_VRAM_DOMAIN;
6c1ce701601b3b Alex Sierra 2021-05-05 1188 if ((prange->start + i) < prange->last &&
6c1ce701601b3b Alex Sierra 2021-05-05 1189 last_domain == (dma_addr[i + 1] & SVM_RANGE_VRAM_DOMAIN))
6c1ce701601b3b Alex Sierra 2021-05-05 1190 continue;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1191
6c1ce701601b3b Alex Sierra 2021-05-05 1192 pr_debug("Mapping range [0x%lx 0x%llx] on domain: %s\n",
6c1ce701601b3b Alex Sierra 2021-05-05 1193 last_start, prange->start + i, last_domain ? "GPU" : "CPU");
6c1ce701601b3b Alex Sierra 2021-05-05 1194 pte_flags = svm_range_get_pte_flags(adev, prange, last_domain);
b53fa124acdcec Philip Yang 2020-06-23 1195 r = amdgpu_vm_bo_update_mapping(adev, bo_adev, vm, false, false, NULL,
6c1ce701601b3b Alex Sierra 2021-05-05 1196 last_start,
6c1ce701601b3b Alex Sierra 2021-05-05 1197 prange->start + i, pte_flags,
6c1ce701601b3b Alex Sierra 2021-05-05 1198 last_start - prange->start,
6c1ce701601b3b Alex Sierra 2021-05-05 1199 NULL,
6c1ce701601b3b Alex Sierra 2021-05-05 1200 dma_addr,
6c1ce701601b3b Alex Sierra 2021-05-05 1201 &vm->last_update,
bf546940d5aa15 Philip Yang 2021-05-12 1202 &table_freed);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1203 if (r) {
f80fe9d3c1149b Felix Kuehling 2021-02-24 1204 pr_debug("failed %d to map to gpu 0x%lx\n", r, prange->start);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1205 goto out;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1206 }
6c1ce701601b3b Alex Sierra 2021-05-05 1207 last_start = prange->start + i + 1;
6c1ce701601b3b Alex Sierra 2021-05-05 1208 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1209
f80fe9d3c1149b Felix Kuehling 2021-02-24 1210 r = amdgpu_vm_update_pdes(adev, vm, false);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1211 if (r) {
f80fe9d3c1149b Felix Kuehling 2021-02-24 1212 pr_debug("failed %d to update directories 0x%lx\n", r,
f80fe9d3c1149b Felix Kuehling 2021-02-24 1213 prange->start);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1214 goto out;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1215 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1216
f80fe9d3c1149b Felix Kuehling 2021-02-24 1217 if (fence)
f80fe9d3c1149b Felix Kuehling 2021-02-24 1218 *fence = dma_fence_get(vm->last_update);
f80fe9d3c1149b Felix Kuehling 2021-02-24 1219
bf546940d5aa15 Philip Yang 2021-05-12 1220 if (table_freed) {
bf546940d5aa15 Philip Yang 2021-05-12 1221 struct kfd_process *p;
bf546940d5aa15 Philip Yang 2021-05-12 1222
bf546940d5aa15 Philip Yang 2021-05-12 1223 p = container_of(prange->svms, struct kfd_process, svms);
bf546940d5aa15 Philip Yang 2021-05-12 1224 amdgpu_amdkfd_flush_gpu_tlb_pasid((struct kgd_dev *)adev,
765385ec00a943 Philip Yang 2021-05-13 1225 p->pasid, TLB_FLUSH_LEGACY);
bf546940d5aa15 Philip Yang 2021-05-12 1226 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1227 out:
f80fe9d3c1149b Felix Kuehling 2021-02-24 1228 return r;
f80fe9d3c1149b Felix Kuehling 2021-02-24 1229 }
f80fe9d3c1149b Felix Kuehling 2021-02-24 1230
:::::: The code at line 1170 was first introduced by commit
:::::: b53fa124acdcec6d05bcdb36b55bf0f84471b1b7 drm/amdkfd: support xgmi same hive mapping
:::::: TO: Philip Yang <Philip.Yang@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 77727 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-01 23:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 23:08 [linux-next:master 13765/14098] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:1170:22: warning: variable 'bo_va' set but not used kernel test robot
2021-07-01 23:08 ` 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.