tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-dkms-4.13
head:   7bde112fab15c0a28c1d056959167cd4393bf538
commit: d3d63af4863b870bb0153c8fe24b41218d232b10 [3809/3830] drm/amdgpu: Remove 
unnecessary includes
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout d3d63af4863b870bb0153c8fe24b41218d232b10
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 
'init_user_pages':
>> drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:660:3: error: implicit 
>> declaration of function 'release_pages'; did you mean 'release_task'? 
>> [-Werror=implicit-function-declaration]
      release_pages(mem->user_pages, bo->tbo.ttm->num_pages, 0);
      ^~~~~~~~~~~~~
      release_task
   cc1: some warnings being treated as errors

vim +660 drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

40731cf1 Harish Kasiviswanathan 2016-06-27  584  
24d10b3d Felix Kuehling         2017-03-21  585  /* Initializes user pages. It 
registers the MMU notifier and validates
24d10b3d Felix Kuehling         2017-03-21  586   * the userptr BO in the GTT 
domain.
24d10b3d Felix Kuehling         2017-03-21  587   *
24d10b3d Felix Kuehling         2017-03-21  588   * The BO must already be on 
the userptr_valid_list. Otherwise an
24d10b3d Felix Kuehling         2017-03-21  589   * eviction and restore may 
happen that leaves the new BO unmapped
24d10b3d Felix Kuehling         2017-03-21  590   * with the user mode queues 
running.
24d10b3d Felix Kuehling         2017-03-21  591   *
24d10b3d Felix Kuehling         2017-03-21  592   * Takes the 
process_info->lock to protect against concurrent restore
24d10b3d Felix Kuehling         2017-03-21  593   * workers.
24d10b3d Felix Kuehling         2017-03-21  594   *
24d10b3d Felix Kuehling         2017-03-21  595   * Returns 0 for success, 
negative errno for errors.
24d10b3d Felix Kuehling         2017-03-21  596   */
24d10b3d Felix Kuehling         2017-03-21  597  static int 
init_user_pages(struct kgd_mem *mem, struct mm_struct *mm,
24d10b3d Felix Kuehling         2017-03-21  598                            
uint64_t user_addr)
24d10b3d Felix Kuehling         2017-03-21  599  {
24d10b3d Felix Kuehling         2017-03-21  600         struct 
amdkfd_process_info *process_info = mem->process_info;
24d10b3d Felix Kuehling         2017-03-21  601         struct amdgpu_bo *bo = 
mem->bo;
ba839029 Le.Ma                  2017-11-24  602         struct 
ttm_operation_ctx ctx = { true, false };
24d10b3d Felix Kuehling         2017-03-21  603         int ret = 0;
24d10b3d Felix Kuehling         2017-03-21  604  
24d10b3d Felix Kuehling         2017-03-21  605         
mutex_lock(&process_info->lock);
24d10b3d Felix Kuehling         2017-03-21  606  
24d10b3d Felix Kuehling         2017-03-21  607         ret = 
amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, user_addr, 0);
24d10b3d Felix Kuehling         2017-03-21  608         if (ret) {
24d10b3d Felix Kuehling         2017-03-21  609                 pr_err("%s: 
Failed to set userptr: %d\n", __func__, ret);
24d10b3d Felix Kuehling         2017-03-21  610                 goto out;
24d10b3d Felix Kuehling         2017-03-21  611         }
24d10b3d Felix Kuehling         2017-03-21  612  
24d10b3d Felix Kuehling         2017-03-21  613         ret = 
amdgpu_mn_register(bo, user_addr);
24d10b3d Felix Kuehling         2017-03-21  614         if (ret) {
24d10b3d Felix Kuehling         2017-03-21  615                 pr_err("%s: 
Failed to register MMU notifier: %d\n",
24d10b3d Felix Kuehling         2017-03-21  616                        
__func__, ret);
24d10b3d Felix Kuehling         2017-03-21  617                 goto out;
24d10b3d Felix Kuehling         2017-03-21  618         }
24d10b3d Felix Kuehling         2017-03-21  619  
24d10b3d Felix Kuehling         2017-03-21  620         /* If no restore worker 
is running concurrently, user_pages
24d10b3d Felix Kuehling         2017-03-21  621          * should not be 
allocated
24d10b3d Felix Kuehling         2017-03-21  622          */
24d10b3d Felix Kuehling         2017-03-21  623         WARN(mem->user_pages, 
"Leaking user_pages array");
24d10b3d Felix Kuehling         2017-03-21  624  
96f59e87 Le.Ma                  2017-09-11  625  #if LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 12, 0)
24d10b3d Felix Kuehling         2017-03-21  626         mem->user_pages = 
drm_calloc_large(bo->tbo.ttm->num_pages,
24d10b3d Felix Kuehling         2017-03-21  627                                 
           sizeof(struct page *));
96f59e87 Le.Ma                  2017-09-11  628  #else
96f59e87 Le.Ma                  2017-09-11  629         mem->user_pages = 
kvmalloc_array(bo->tbo.ttm->num_pages,
96f59e87 Le.Ma                  2017-09-11  630                                 
           sizeof(struct page *),
96f59e87 Le.Ma                  2017-09-11  631                                 
           GFP_KERNEL | __GFP_ZERO);
96f59e87 Le.Ma                  2017-09-11  632  #endif
24d10b3d Felix Kuehling         2017-03-21  633         if (!mem->user_pages) {
24d10b3d Felix Kuehling         2017-03-21  634                 pr_err("%s: 
Failed to allocate pages array\n", __func__);
24d10b3d Felix Kuehling         2017-03-21  635                 ret = -ENOMEM;
24d10b3d Felix Kuehling         2017-03-21  636                 goto 
unregister_out;
24d10b3d Felix Kuehling         2017-03-21  637         }
24d10b3d Felix Kuehling         2017-03-21  638  
24d10b3d Felix Kuehling         2017-03-21  639         ret = 
amdgpu_ttm_tt_get_user_pages(bo->tbo.ttm, mem->user_pages);
24d10b3d Felix Kuehling         2017-03-21  640         if (ret) {
49da8283 Felix Kuehling         2017-04-05  641                 pr_err("%s: 
Failed to get user pages: %d\n", __func__, ret);
24d10b3d Felix Kuehling         2017-03-21  642                 goto free_out;
24d10b3d Felix Kuehling         2017-03-21  643         }
24d10b3d Felix Kuehling         2017-03-21  644  
1352c34f Felix Kuehling         2017-09-05  645         
amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm, mem->user_pages);
24d10b3d Felix Kuehling         2017-03-21  646  
24d10b3d Felix Kuehling         2017-03-21  647         ret = 
amdgpu_bo_reserve(bo, true);
24d10b3d Felix Kuehling         2017-03-21  648         if (ret) {
24d10b3d Felix Kuehling         2017-03-21  649                 pr_err("%s: 
Failed to reserve BO\n", __func__);
24d10b3d Felix Kuehling         2017-03-21  650                 goto 
release_out;
24d10b3d Felix Kuehling         2017-03-21  651         }
24d10b3d Felix Kuehling         2017-03-21  652         
amdgpu_ttm_placement_from_domain(bo, mem->domain);
ba839029 Le.Ma                  2017-11-24  653         ret = 
ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
24d10b3d Felix Kuehling         2017-03-21  654         if (ret)
24d10b3d Felix Kuehling         2017-03-21  655                 pr_err("%s: 
failed to validate BO\n", __func__);
24d10b3d Felix Kuehling         2017-03-21  656         amdgpu_bo_unreserve(bo);
24d10b3d Felix Kuehling         2017-03-21  657  
24d10b3d Felix Kuehling         2017-03-21  658  release_out:
24d10b3d Felix Kuehling         2017-03-21  659         if (ret)
24d10b3d Felix Kuehling         2017-03-21 @660                 
release_pages(mem->user_pages, bo->tbo.ttm->num_pages, 0);
24d10b3d Felix Kuehling         2017-03-21  661  free_out:
96f59e87 Le.Ma                  2017-09-11  662  #if LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 12, 0)
24d10b3d Felix Kuehling         2017-03-21  663         
drm_free_large(mem->user_pages);
96f59e87 Le.Ma                  2017-09-11  664  #else
96f59e87 Le.Ma                  2017-09-11  665         kvfree(mem->user_pages);
96f59e87 Le.Ma                  2017-09-11  666  #endif
24d10b3d Felix Kuehling         2017-03-21  667         mem->user_pages = NULL;
24d10b3d Felix Kuehling         2017-03-21  668  unregister_out:
24d10b3d Felix Kuehling         2017-03-21  669         if (ret)
24d10b3d Felix Kuehling         2017-03-21  670                 
amdgpu_mn_unregister(bo);
24d10b3d Felix Kuehling         2017-03-21  671  out:
24d10b3d Felix Kuehling         2017-03-21  672         
mutex_unlock(&process_info->lock);
24d10b3d Felix Kuehling         2017-03-21  673         return ret;
24d10b3d Felix Kuehling         2017-03-21  674  }
24d10b3d Felix Kuehling         2017-03-21  675  

:::::: The code at line 660 was first introduced by commit
:::::: 24d10b3d807a7c6ff98b98bea73c2bba722a94f7 drm/amdgpu: New HSA MMU 
notifiers to work under memory pressure

:::::: TO: Felix Kuehling <felix.kuehl...@amd.com>
:::::: CC: Le.Ma <le...@amd.com>

---
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to