linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [aaron:for_lkp_skl_2sp2_test 148/225] drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c:669:2: error: too many arguments to function 'release_pages'
@ 2018-01-04 10:28 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-01-04 10:28 UTC (permalink / raw)
  To: Mel Gorman
  Cc: kbuild-all, Aaron Lu, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 5921 bytes --]

tree:   aaron/for_lkp_skl_2sp2_test
head:   6c9381b65892222cbe2214fb22af9043f9ce1065
commit: efff595a987d35a21402e92bc901c1900f631263 [148/225] mm: remove cold parameter for release_pages
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout efff595a987d35a21402e92bc901c1900f631263
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
>> drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c:669:2: error: too many arguments to function 'release_pages'
     release_pages(pages, pinned, 0);
     ^~~~~~~~~~~~~
   In file included from arch/x86/include/asm/pgalloc.h:6:0,
                    from include/drm/drmP.h:62,
                    from drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c:37:
   include/linux/pagemap.h:120:6: note: declared here
    void release_pages(struct page **pages, int nr);
         ^~~~~~~~~~~~~
--
   drivers/gpu//drm/amd/amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_parser_bos':
>> drivers/gpu//drm/amd/amdgpu/amdgpu_cs.c:559:5: error: too many arguments to function 'release_pages'
        release_pages(e->user_pages,
        ^~~~~~~~~~~~~
   In file included from drivers/gpu//drm/amd/amdgpu/amdgpu_cs.c:27:0:
   include/linux/pagemap.h:120:6: note: declared here
    void release_pages(struct page **pages, int nr);
         ^~~~~~~~~~~~~

sparse warnings: (new ones prefixed by >>)


vim +/release_pages +669 drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c

d38ceaf9 Alex Deucher    2015-04-20  615  
2f568dbd Christian Konig 2016-02-23  616  int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
d38ceaf9 Alex Deucher    2015-04-20  617  {
d38ceaf9 Alex Deucher    2015-04-20  618  	struct amdgpu_ttm_tt *gtt = (void *)ttm;
768ae309 Lorenzo Stoakes 2016-10-13  619  	unsigned int flags = 0;
2f568dbd Christian Konig 2016-02-23  620  	unsigned pinned = 0;
2f568dbd Christian Konig 2016-02-23  621  	int r;
d38ceaf9 Alex Deucher    2015-04-20  622  
768ae309 Lorenzo Stoakes 2016-10-13  623  	if (!(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY))
768ae309 Lorenzo Stoakes 2016-10-13  624  		flags |= FOLL_WRITE;
768ae309 Lorenzo Stoakes 2016-10-13  625  
b72cf4fc Christian Konig 2017-09-03  626  	down_read(&current->mm->mmap_sem);
b72cf4fc Christian Konig 2017-09-03  627  
d38ceaf9 Alex Deucher    2015-04-20  628  	if (gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) {
2f568dbd Christian Konig 2016-02-23  629  		/* check that we only use anonymous memory
d38ceaf9 Alex Deucher    2015-04-20  630  		   to prevent problems with writeback */
d38ceaf9 Alex Deucher    2015-04-20  631  		unsigned long end = gtt->userptr + ttm->num_pages * PAGE_SIZE;
d38ceaf9 Alex Deucher    2015-04-20  632  		struct vm_area_struct *vma;
d38ceaf9 Alex Deucher    2015-04-20  633  
d38ceaf9 Alex Deucher    2015-04-20  634  		vma = find_vma(gtt->usermm, gtt->userptr);
b72cf4fc Christian Konig 2017-09-03  635  		if (!vma || vma->vm_file || vma->vm_end < end) {
b72cf4fc Christian Konig 2017-09-03  636  			up_read(&current->mm->mmap_sem);
d38ceaf9 Alex Deucher    2015-04-20  637  			return -EPERM;
d38ceaf9 Alex Deucher    2015-04-20  638  		}
b72cf4fc Christian Konig 2017-09-03  639  	}
d38ceaf9 Alex Deucher    2015-04-20  640  
d38ceaf9 Alex Deucher    2015-04-20  641  	do {
d38ceaf9 Alex Deucher    2015-04-20  642  		unsigned num_pages = ttm->num_pages - pinned;
d38ceaf9 Alex Deucher    2015-04-20  643  		uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
2f568dbd Christian Konig 2016-02-23  644  		struct page **p = pages + pinned;
637dd3b5 Christian Konig 2016-03-03  645  		struct amdgpu_ttm_gup_task_list guptask;
637dd3b5 Christian Konig 2016-03-03  646  
637dd3b5 Christian Konig 2016-03-03  647  		guptask.task = current;
637dd3b5 Christian Konig 2016-03-03  648  		spin_lock(&gtt->guptasklock);
637dd3b5 Christian Konig 2016-03-03  649  		list_add(&guptask.list, &gtt->guptasks);
637dd3b5 Christian Konig 2016-03-03  650  		spin_unlock(&gtt->guptasklock);
d38ceaf9 Alex Deucher    2015-04-20  651  
768ae309 Lorenzo Stoakes 2016-10-13  652  		r = get_user_pages(userptr, num_pages, flags, p, NULL);
637dd3b5 Christian Konig 2016-03-03  653  
637dd3b5 Christian Konig 2016-03-03  654  		spin_lock(&gtt->guptasklock);
637dd3b5 Christian Konig 2016-03-03  655  		list_del(&guptask.list);
637dd3b5 Christian Konig 2016-03-03  656  		spin_unlock(&gtt->guptasklock);
d38ceaf9 Alex Deucher    2015-04-20  657  
d38ceaf9 Alex Deucher    2015-04-20  658  		if (r < 0)
d38ceaf9 Alex Deucher    2015-04-20  659  			goto release_pages;
d38ceaf9 Alex Deucher    2015-04-20  660  
d38ceaf9 Alex Deucher    2015-04-20  661  		pinned += r;
d38ceaf9 Alex Deucher    2015-04-20  662  
d38ceaf9 Alex Deucher    2015-04-20  663  	} while (pinned < ttm->num_pages);
d38ceaf9 Alex Deucher    2015-04-20  664  
b72cf4fc Christian Konig 2017-09-03  665  	up_read(&current->mm->mmap_sem);
2f568dbd Christian Konig 2016-02-23  666  	return 0;
2f568dbd Christian Konig 2016-02-23  667  
2f568dbd Christian Konig 2016-02-23  668  release_pages:
2f568dbd Christian Konig 2016-02-23 @669  	release_pages(pages, pinned, 0);
b72cf4fc Christian Konig 2017-09-03  670  	up_read(&current->mm->mmap_sem);
2f568dbd Christian Konig 2016-02-23  671  	return r;
2f568dbd Christian Konig 2016-02-23  672  }
2f568dbd Christian Konig 2016-02-23  673  

:::::: The code at line 669 was first introduced by commit
:::::: 2f568dbd6b944c2e8c0c54b53c2211c23995e6a4 drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6

:::::: TO: Christian Konig <christian.koenig@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
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: 62054 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-04 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04 10:28 [aaron:for_lkp_skl_2sp2_test 148/225] drivers/gpu//drm/amd/amdgpu/amdgpu_ttm.c:669:2: error: too many arguments to function 'release_pages' kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).