From: kbuild test robot <fengguang.wu@intel.com>
To: Mel Gorman <mgorman@suse.de>
Cc: kbuild-all@01.org, Aaron Lu <aaron.lu@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [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'
Date: Thu, 4 Jan 2018 18:28:11 +0800 [thread overview]
Message-ID: <201801041808.dPvGY4oC%fengguang.wu@intel.com> (raw)
[-- 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(¤t->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(¤t->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(>t->guptasklock);
637dd3b5 Christian Konig 2016-03-03 649 list_add(&guptask.list, >t->guptasks);
637dd3b5 Christian Konig 2016-03-03 650 spin_unlock(>t->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(>t->guptasklock);
637dd3b5 Christian Konig 2016-03-03 655 list_del(&guptask.list);
637dd3b5 Christian Konig 2016-03-03 656 spin_unlock(>t->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(¤t->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(¤t->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 --]
reply other threads:[~2018-01-04 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201801041808.dPvGY4oC%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=aaron.lu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox