* [gabbayo:amdkfd-next 6/28] drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'?
@ 2018-05-15 13:44 kbuild test robot
2018-05-15 21:54 ` Felix Kuehling
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-05-15 13:44 UTC (permalink / raw)
To: Felix Kuehling; +Cc: kbuild-all, dri-devel
[-- Attachment #1: Type: text/plain, Size: 4092 bytes --]
tree: git://people.freedesktop.org/~gabbayo/linux amdkfd-next
head: 8feaccf71dd61f2201493068055e0d1d699014df
commit: 5ae0283e831a94c714fce61063e4724baf364ef3 [6/28] drm/amdgpu: Add userptr support for KFD
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 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 5ae0283e831a94c714fce61063e4724baf364ef3
# save the attached .config to linux build tree
make.cross ARCH=sparc64
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:632: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);
^~~~~~~~~~~~~
release_task
cc1: some warnings being treated as errors
vim +632 drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
561
562 /* Initializes user pages. It registers the MMU notifier and validates
563 * the userptr BO in the GTT domain.
564 *
565 * The BO must already be on the userptr_valid_list. Otherwise an
566 * eviction and restore may happen that leaves the new BO unmapped
567 * with the user mode queues running.
568 *
569 * Takes the process_info->lock to protect against concurrent restore
570 * workers.
571 *
572 * Returns 0 for success, negative errno for errors.
573 */
574 static int init_user_pages(struct kgd_mem *mem, struct mm_struct *mm,
575 uint64_t user_addr)
576 {
577 struct amdkfd_process_info *process_info = mem->process_info;
578 struct amdgpu_bo *bo = mem->bo;
579 struct ttm_operation_ctx ctx = { true, false };
580 int ret = 0;
581
582 mutex_lock(&process_info->lock);
583
584 ret = amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, user_addr, 0);
585 if (ret) {
586 pr_err("%s: Failed to set userptr: %d\n", __func__, ret);
587 goto out;
588 }
589
590 ret = amdgpu_mn_register(bo, user_addr);
591 if (ret) {
592 pr_err("%s: Failed to register MMU notifier: %d\n",
593 __func__, ret);
594 goto out;
595 }
596
597 /* If no restore worker is running concurrently, user_pages
598 * should not be allocated
599 */
600 WARN(mem->user_pages, "Leaking user_pages array");
601
602 mem->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
603 sizeof(struct page *),
604 GFP_KERNEL | __GFP_ZERO);
605 if (!mem->user_pages) {
606 pr_err("%s: Failed to allocate pages array\n", __func__);
607 ret = -ENOMEM;
608 goto unregister_out;
609 }
610
611 ret = amdgpu_ttm_tt_get_user_pages(bo->tbo.ttm, mem->user_pages);
612 if (ret) {
613 pr_err("%s: Failed to get user pages: %d\n", __func__, ret);
614 goto free_out;
615 }
616
617 amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm, mem->user_pages);
618
619 ret = amdgpu_bo_reserve(bo, true);
620 if (ret) {
621 pr_err("%s: Failed to reserve BO\n", __func__);
622 goto release_out;
623 }
624 amdgpu_ttm_placement_from_domain(bo, mem->domain);
625 ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
626 if (ret)
627 pr_err("%s: failed to validate BO\n", __func__);
628 amdgpu_bo_unreserve(bo);
629
630 release_out:
631 if (ret)
> 632 release_pages(mem->user_pages, bo->tbo.ttm->num_pages);
633 free_out:
634 kvfree(mem->user_pages);
635 mem->user_pages = NULL;
636 unregister_out:
637 if (ret)
638 amdgpu_mn_unregister(bo);
639 out:
640 mutex_unlock(&process_info->lock);
641 return ret;
642 }
643
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53155 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gabbayo:amdkfd-next 6/28] drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'?
2018-05-15 13:44 [gabbayo:amdkfd-next 6/28] drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'? kbuild test robot
@ 2018-05-15 21:54 ` Felix Kuehling
0 siblings, 0 replies; 2+ messages in thread
From: Felix Kuehling @ 2018-05-15 21:54 UTC (permalink / raw)
To: kbuild test robot, Oded Gabbay; +Cc: kbuild-all, dri-devel
We need to #include <linux/pagemap.h>.
On 2018-05-15 09:44 AM, kbuild test robot wrote:
> tree: git://people.freedesktop.org/~gabbayo/linux amdkfd-next
> head: 8feaccf71dd61f2201493068055e0d1d699014df
> commit: 5ae0283e831a94c714fce61063e4724baf364ef3 [6/28] drm/amdgpu: Add userptr support for KFD
> config: sparc64-allmodconfig (attached as .config)
> compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 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 5ae0283e831a94c714fce61063e4724baf364ef3
> # save the attached .config to linux build tree
> make.cross ARCH=sparc64
>
> 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:632: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);
> ^~~~~~~~~~~~~
> release_task
> cc1: some warnings being treated as errors
>
> vim +632 drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>
> 561
> 562 /* Initializes user pages. It registers the MMU notifier and validates
> 563 * the userptr BO in the GTT domain.
> 564 *
> 565 * The BO must already be on the userptr_valid_list. Otherwise an
> 566 * eviction and restore may happen that leaves the new BO unmapped
> 567 * with the user mode queues running.
> 568 *
> 569 * Takes the process_info->lock to protect against concurrent restore
> 570 * workers.
> 571 *
> 572 * Returns 0 for success, negative errno for errors.
> 573 */
> 574 static int init_user_pages(struct kgd_mem *mem, struct mm_struct *mm,
> 575 uint64_t user_addr)
> 576 {
> 577 struct amdkfd_process_info *process_info = mem->process_info;
> 578 struct amdgpu_bo *bo = mem->bo;
> 579 struct ttm_operation_ctx ctx = { true, false };
> 580 int ret = 0;
> 581
> 582 mutex_lock(&process_info->lock);
> 583
> 584 ret = amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, user_addr, 0);
> 585 if (ret) {
> 586 pr_err("%s: Failed to set userptr: %d\n", __func__, ret);
> 587 goto out;
> 588 }
> 589
> 590 ret = amdgpu_mn_register(bo, user_addr);
> 591 if (ret) {
> 592 pr_err("%s: Failed to register MMU notifier: %d\n",
> 593 __func__, ret);
> 594 goto out;
> 595 }
> 596
> 597 /* If no restore worker is running concurrently, user_pages
> 598 * should not be allocated
> 599 */
> 600 WARN(mem->user_pages, "Leaking user_pages array");
> 601
> 602 mem->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
> 603 sizeof(struct page *),
> 604 GFP_KERNEL | __GFP_ZERO);
> 605 if (!mem->user_pages) {
> 606 pr_err("%s: Failed to allocate pages array\n", __func__);
> 607 ret = -ENOMEM;
> 608 goto unregister_out;
> 609 }
> 610
> 611 ret = amdgpu_ttm_tt_get_user_pages(bo->tbo.ttm, mem->user_pages);
> 612 if (ret) {
> 613 pr_err("%s: Failed to get user pages: %d\n", __func__, ret);
> 614 goto free_out;
> 615 }
> 616
> 617 amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm, mem->user_pages);
> 618
> 619 ret = amdgpu_bo_reserve(bo, true);
> 620 if (ret) {
> 621 pr_err("%s: Failed to reserve BO\n", __func__);
> 622 goto release_out;
> 623 }
> 624 amdgpu_ttm_placement_from_domain(bo, mem->domain);
> 625 ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
> 626 if (ret)
> 627 pr_err("%s: failed to validate BO\n", __func__);
> 628 amdgpu_bo_unreserve(bo);
> 629
> 630 release_out:
> 631 if (ret)
> > 632 release_pages(mem->user_pages, bo->tbo.ttm->num_pages);
> 633 free_out:
> 634 kvfree(mem->user_pages);
> 635 mem->user_pages = NULL;
> 636 unregister_out:
> 637 if (ret)
> 638 amdgpu_mn_unregister(bo);
> 639 out:
> 640 mutex_unlock(&process_info->lock);
> 641 return ret;
> 642 }
> 643
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-15 21:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 13:44 [gabbayo:amdkfd-next 6/28] drivers/gpu//drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:632:3: error: implicit declaration of function 'release_pages'; did you mean 'release_task'? kbuild test robot
2018-05-15 21:54 ` Felix Kuehling
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.