tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-hybrid-4.12 head: 0439a4b45dfef1c775f45f29831bfbcee37a582f commit: d35e5029162c64ba73eb0ae70366f1df9a6eb5eb [1229/2092] radeon_kfd.c copied config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout d35e5029162c64ba73eb0ae70366f1df9a6eb5eb # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_pdd_from_buffer_object': drivers/gpu/drm/radeon/radeon_kfd.c:219:22: error: 'struct radeon_bo' has no member named 'pdd'; did you mean 'pid'? return mem->data2.bo->pdd; ^~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'open_graphic_handle': drivers/gpu/drm/radeon/radeon_kfd.c:532:34: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types] gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle); ^~~~ In file included from drivers/gpu/drm/radeon/radeon.h:77:0, from drivers/gpu/drm/radeon/radeon_kfd.c:27: include/drm/drm_gem.h:319:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *' struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle); ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:532:46: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion] gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle); ^~~~ In file included from drivers/gpu/drm/radeon/radeon.h:77:0, from drivers/gpu/drm/radeon/radeon_kfd.c:27: include/drm/drm_gem.h:319:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'void *' struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle); ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:532:12: error: too many arguments to function 'drm_gem_object_lookup' gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle); ^~~~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/radeon/radeon.h:77:0, from drivers/gpu/drm/radeon/radeon_kfd.c:27: include/drm/drm_gem.h:319:24: note: declared here struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle); ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'map_bo_to_gpuvm': drivers/gpu/drm/radeon/radeon_kfd.c:1276:9: error: too many arguments to function 'ttm_bo_wait' ret = ttm_bo_wait(&bo->tbo, true, false, false); ^~~~~~~~~~~ In file included from drivers/gpu/drm/radeon/radeon.h:71:0, from drivers/gpu/drm/radeon/radeon_kfd.c:27: include/drm/ttm/ttm_bo_api.h:292:12: note: declared here extern int ttm_bo_wait(struct ttm_buffer_object *bo, ^~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'write_config_static_mem': drivers/gpu/drm/radeon/radeon_kfd.c:1373:26: error: 'SH_STATIC_MEM_CONFIG__SWIZZLE_ENABLE__SHIFT' undeclared (first use in this function) reg = swizzle_enable << SH_STATIC_MEM_CONFIG__SWIZZLE_ENABLE__SHIFT | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1373:26: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/radeon/radeon_kfd.c:1374:19: error: 'SH_STATIC_MEM_CONFIG__ELEMENT_SIZE__SHIFT' undeclared (first use in this function) element_size << SH_STATIC_MEM_CONFIG__ELEMENT_SIZE__SHIFT | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1375:19: error: 'SH_STATIC_MEM_CONFIG__INDEX_STRIDE__SHIFT' undeclared (first use in this function) index_stride << SH_STATIC_MEM_CONFIG__INDEX_STRIDE__SHIFT | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1376:19: error: 'SH_STATIC_MEM_CONFIG__PRIVATE_MTYPE__SHIFT' undeclared (first use in this function) index_stride << SH_STATIC_MEM_CONFIG__PRIVATE_MTYPE__SHIFT; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/radeon/radeon_kfd.c:27:0: drivers/gpu/drm/radeon/radeon_kfd.c: In function 'alloc_memory_of_scratch': drivers/gpu/drm/radeon/radeon_kfd.c:1387:9: error: 'SH_HIDDEN_PRIVATE_BASE_VMID' undeclared (first use in this function) WREG32(SH_HIDDEN_PRIVATE_BASE_VMID, va); ^ drivers/gpu/drm/radeon/radeon.h:2528:44: note: in definition of macro 'WREG32' #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false) ^~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'alloc_memory_of_gpu': drivers/gpu/drm/radeon/radeon_kfd.c:1426:4: error: 'struct radeon_bo' has no member named 'pdd'; did you mean 'pid'? bo->pdd = pdd; ^~ In file included from include/linux/printk.h:329:0, from include/linux/kernel.h:13, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/gpu/drm/radeon/radeon_kfd.c:23: drivers/gpu/drm/radeon/radeon_kfd.c:1431:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pr_debug("Set BO to VA %p\n", (void *) va); ^ include/linux/dynamic_debug.h:127:10: note: in definition of macro 'dynamic_pr_debug' ##__VA_ARGS__); \ ^~~~~~~~~~~ >> drivers/gpu/drm/radeon/radeon_kfd.c:1431:2: note: in expansion of macro 'pr_debug' pr_debug("Set BO to VA %p\n", (void *) va); ^~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'set_num_of_requests': drivers/gpu/drm/radeon/radeon_kfd.c:1624:29: error: 'ATC_ATS_DEBUG' undeclared (first use in this function) value = read_register(dev, ATC_ATS_DEBUG); ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1625:12: error: 'NUM_REQUESTS_AT_ERR_MASK' undeclared (first use in this function) value &= ~NUM_REQUESTS_AT_ERR_MASK; ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1626:11: error: implicit declaration of function 'NUM_REQUESTS_AT_ERR' [-Werror=implicit-function-declaration] value |= NUM_REQUESTS_AT_ERR(num_of_req); ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_cu_info': drivers/gpu/drm/radeon/radeon_kfd.c:1634:24: error: storage size of 'rcu_info' isn't known struct radeon_cu_info rcu_info; ^~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c:1639:16: error: 'struct radeon_asic' has no member named 'get_cu_info' if (rdev->asic->get_cu_info == NULL) ^~ drivers/gpu/drm/radeon/radeon_kfd.c:1643:12: error: 'struct radeon_asic' has no member named 'get_cu_info' rdev->asic->get_cu_info(rdev, &rcu_info); ^~ drivers/gpu/drm/radeon/radeon_kfd.c:1634:24: warning: unused variable 'rcu_info' [-Wunused-variable] struct radeon_cu_info rcu_info; ^~~~~~~~ drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_pdd_from_buffer_object': drivers/gpu/drm/radeon/radeon_kfd.c:220:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors vim +/pr_debug +1431 drivers/gpu/drm/radeon/radeon_kfd.c 1392 1393 static int alloc_memory_of_gpu(struct kgd_dev *kgd, uint64_t va, size_t size, 1394 void *vm, struct kgd_mem **mem, 1395 uint64_t *offset, void **kptr, 1396 struct kfd_process_device *pdd, uint32_t flags) 1397 { 1398 struct radeon_device *rdev = (struct radeon_device *) kgd; 1399 int ret; 1400 struct radeon_bo_va *bo_va; 1401 struct radeon_bo *bo; 1402 1403 BUG_ON(kgd == NULL); 1404 BUG_ON(size == 0); 1405 BUG_ON(mem == NULL); 1406 BUG_ON(vm == NULL); 1407 1408 *mem = kzalloc(sizeof(struct kgd_mem), GFP_KERNEL); 1409 if (*mem == NULL) { 1410 ret = -ENOMEM; 1411 goto err; 1412 } 1413 mutex_init(&(*mem)->data2.lock); 1414 1415 /* Allocate buffer object on VRAM */ 1416 ret = radeon_bo_create(rdev, size, PAGE_SIZE, false, 1417 RADEON_GEM_DOMAIN_VRAM, 1418 RADEON_GEM_NO_CPU_ACCESS, NULL, NULL, &bo); 1419 if (ret != 0) { 1420 pr_err("amdkfd: Failed to create BO object on VRAM. ret == %d\n", 1421 ret); 1422 goto err_bo_create; 1423 } 1424 1425 pr_debug("Created BO on VRAM with size %zu bytes\n", size); 1426 bo->pdd = pdd; 1427 ret = add_bo_to_vm(rdev, va, vm, bo, &bo_va); 1428 if (ret != 0) 1429 goto err_map; 1430 > 1431 pr_debug("Set BO to VA %p\n", (void *) va); 1432 1433 (*mem)->data2.bo = bo; 1434 (*mem)->data2.bo_va = bo_va; 1435 (*mem)->data2.mapped_to_gpu_memory = 0; 1436 1437 return 0; 1438 1439 err_map: 1440 radeon_bo_unref(&bo); 1441 err_bo_create: 1442 kfree(*mem); 1443 err: 1444 return ret; 1445 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel