All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher@amd.com>
To: "Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Yang, Philip" <Philip.Yang@amd.com>
Cc: "Koenig, Christian" <Christian.Koenig@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [radeon-alex:drm-next-5.2-wip 21/42] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:756:32: error: 'HMM_PFN_VALID' undeclared; did you mean '_PAGE_VALID'?
Date: Thu, 4 Apr 2019 12:52:22 +0000	[thread overview]
Message-ID: <BN6PR12MB18099BAC0CB4151C1C93D6DCF7500@BN6PR12MB1809.namprd12.prod.outlook.com> (raw)
In-Reply-To: <c7ae4db2-c9fd-00b8-405e-8bb879ae889c@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 7663 bytes --]

The fixes are there; they are the subsequent commits, I guess I can squash them in.

Alex
________________________________
From: Kuehling, Felix
Sent: Wednesday, April 3, 2019 6:20 PM
To: Yang, Philip; Deucher, Alexander
Cc: dri-devel@lists.freedesktop.org; Koenig, Christian
Subject: Re: [radeon-alex:drm-next-5.2-wip 21/42] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:756:32: error: 'HMM_PFN_VALID' undeclared; did you mean '_PAGE_VALID'?

[dropping the robot]

I think Philip fixed those issues on amd-staging-drm-next. Either some
fixes are missing on drm-next-5.2-wip, or they are there but should be
squashed to avoid hitting these errors on intermediate builds.

Regards,
   Felix

On 2019-04-03 2:26 p.m., kbuild test robot wrote:
> tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-5.2-wip
> head:   5666aea3ea494d4dd96df8f092cab32dbeeac321
> commit: 95db8d6001df8966e3370a66c9f358925fbcc890 [21/42] drm/amdgpu: replace get_user_pages with HMM mirror helpers
> config: mips-allyesconfig (attached as .config)
> compiler: mips-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 95db8d6001df8966e3370a66c9f358925fbcc890
>          # save the attached .config to linux build tree
>          GCC_VERSION=7.2.0 make.cross ARCH=mips
>
> Note: the radeon-alex/drm-next-5.2-wip HEAD 5666aea3ea494d4dd96df8f092cab32dbeeac321 builds fine.
>        It only hurts bisectibility.
>
> All errors (new ones prefixed by >>):
>
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:713:19: error: field 'range' has incomplete type
>       struct hmm_range range;
>                        ^~~~~
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:738:7: error: dereferencing pointer to incomplete type 'struct hmm_range'
>       range->vma = find_vma(mm, gtt->userptr);
>            ^~
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:756:32: error: 'HMM_PFN_VALID' undeclared (first use in this function); did you mean '_PAGE_VALID'?
>       range->pfns[0] = range->flags[HMM_PFN_VALID];
>                                     ^~~~~~~~~~~~~
>                                     _PAGE_VALID
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:756:32: note: each undeclared identifier is reported only once for each function it appears in
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:758:22: error: 'HMM_PFN_WRITE' undeclared (first use in this function); did you mean 'HMM_PFN_VALID'?
>          0 : range->flags[HMM_PFN_WRITE];
>                           ^~~~~~~~~~~~~
>                           HMM_PFN_VALID
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:763:6: error: implicit declaration of function 'hmm_vma_fault'; did you mean 'hmm_mm_init'? [-Werror=implicit-function-declaration]
>       r = hmm_vma_fault(range, true);
>           ^~~~~~~~~~~~~
>           hmm_mm_init
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:770:14: error: implicit declaration of function 'hmm_pfn_to_page'; did you mean '__pfn_to_page'? [-Werror=implicit-function-declaration]
>        pages[i] = hmm_pfn_to_page(range, range->pfns[i]);
>                   ^~~~~~~~~~~~~~~
>                   __pfn_to_page
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages_done':
>     drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:798:7: error: implicit declaration of function 'hmm_vma_range_done'; did you mean 'drm_vma_node_size'? [-Werror=implicit-function-declaration]
>        r = hmm_vma_range_done(&gtt->range);
>            ^~~~~~~~~~~~~~~~~~
>            drm_vma_node_size
>     cc1: some warnings being treated as errors
>
> vim +756 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>
>     703
>     704       /*
>     705        * TTM backend functions.
>     706        */
>     707       struct amdgpu_ttm_tt {
>     708               struct ttm_dma_tt       ttm;
>     709               u64                     offset;
>     710               uint64_t                userptr;
>     711               struct task_struct      *usertask;
>     712               uint32_t                userflags;
>   > 713               struct hmm_range        range;
>     714       };
>     715
>     716       /**
>     717        * amdgpu_ttm_tt_get_user_pages - get device accessible pages that back user
>     718        * memory and start HMM tracking CPU page table update
>     719        *
>     720        * Calling function must call amdgpu_ttm_tt_userptr_range_done() once and only
>     721        * once afterwards to stop HMM tracking
>     722        */
>     723       int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
>     724       {
>     725               struct amdgpu_ttm_tt *gtt = (void *)ttm;
>     726               struct mm_struct *mm = gtt->usertask->mm;
>     727               unsigned long end = gtt->userptr + ttm->num_pages * PAGE_SIZE;
>     728               struct hmm_range *range = &gtt->range;
>     729               int r = 0, i;
>     730
>     731               if (!mm) /* Happens during process shutdown */
>     732                       return -ESRCH;
>     733
>     734               amdgpu_hmm_init_range(range);
>     735
>     736               down_read(&mm->mmap_sem);
>     737
>     738               range->vma = find_vma(mm, gtt->userptr);
>     739               if (!range_in_vma(range->vma, gtt->userptr, end))
>     740                       r = -EFAULT;
>     741               else if ((gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) &&
>     742                       range->vma->vm_file)
>     743                       r = -EPERM;
>     744               if (r)
>     745                       goto out;
>     746
>     747               range->pfns = kvmalloc_array(ttm->num_pages, sizeof(uint64_t),
>     748                                            GFP_KERNEL);
>     749               if (range->pfns == NULL) {
>     750                       r = -ENOMEM;
>     751                       goto out;
>     752               }
>     753               range->start = gtt->userptr;
>     754               range->end = end;
>     755
>   > 756               range->pfns[0] = range->flags[HMM_PFN_VALID];
>     757               range->pfns[0] |= amdgpu_ttm_tt_is_readonly(ttm) ?
>     758                                       0 : range->flags[HMM_PFN_WRITE];
>     759               for (i = 1; i < ttm->num_pages; i++)
>     760                       range->pfns[i] = range->pfns[0];
>     761
>     762               /* This may trigger page table update */
>     763               r = hmm_vma_fault(range, true);
>     764               if (r)
>     765                       goto out_free_pfns;
>     766
>     767               up_read(&mm->mmap_sem);
>     768
>     769               for (i = 0; i < ttm->num_pages; i++)
>     770                       pages[i] = hmm_pfn_to_page(range, range->pfns[i]);
>     771
>     772               return 0;
>     773
>     774       out_free_pfns:
>     775               kvfree(range->pfns);
>     776               range->pfns = NULL;
>     777       out:
>     778               up_read(&mm->mmap_sem);
>     779               return r;
>     780       }
>     781
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #1.2: Type: text/html, Size: 18984 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-04-04 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 18:26 [radeon-alex:drm-next-5.2-wip 21/42] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:756:32: error: 'HMM_PFN_VALID' undeclared; did you mean '_PAGE_VALID'? kbuild test robot
2019-04-03 22:20 ` Kuehling, Felix
2019-04-04 12:52   ` Deucher, Alexander [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR12MB18099BAC0CB4151C1C93D6DCF7500@BN6PR12MB1809.namprd12.prod.outlook.com \
    --to=alexander.deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.