linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Airlie" <airlied@linux.ie>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Christian König" <christian.koenig@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>
Subject: Re: linux-next: manual merge of the tip tree with the drm tree
Date: Thu, 17 Mar 2016 10:00:56 +0100	[thread overview]
Message-ID: <2913254.nLUtoX01AU@wuerfel> (raw)
In-Reply-To: <20160317130029.5569b2f4@canb.auug.org.au>

On Thursday 17 March 2016 13:00:29 Stephen Rothwell wrote:
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 0f42b1a24446,7b82e57aa09c..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@@ -532,21 -516,9 +532,20 @@@ int amdgpu_ttm_tt_get_user_pages(struc
>         do {
>                 unsigned num_pages = ttm->num_pages - pinned;
>                 uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
>  -              struct page **pages = ttm->pages + pinned;
>  +              struct page **p = pages + pinned;
>  +              struct amdgpu_ttm_gup_task_list guptask;
>  +
>  +              guptask.task = current;
>  +              spin_lock(&gtt->guptasklock);
>  +              list_add(&guptask.list, &gtt->guptasks);
>  +              spin_unlock(&gtt->guptasklock);
>   
> -               r = get_user_pages(current, current->mm, userptr, num_pages,
> -                                  write, 0, p, NULL);
> +               r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
>  +
>  +              spin_lock(&gtt->guptasklock);
>  +              list_del(&guptask.list);
>  +              spin_unlock(&gtt->guptasklock);
>  +
>                 if (r < 0)
>                         goto release_pages;

Your merge looks incorrect to me, and I got a build warning for it:

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:535:17: error: unused variable 'p' [-Werror=unused-variable]

I think the one-line change below is what is needed here, but it's probably
best for amdgpu maintainers to take a closer look.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

index 8b9b245fd0c8..ab34190859a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -540,7 +540,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
 		list_add(&guptask.list, &gtt->guptasks);
 		spin_unlock(&gtt->guptasklock);
 
-		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
+		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
 
 		spin_lock(&gtt->guptasklock);
 		list_del(&guptask.list);

  reply	other threads:[~2016-03-17  9:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  2:00 linux-next: manual merge of the tip tree with the drm tree Stephen Rothwell
2016-03-17  9:00 ` Arnd Bergmann [this message]
2016-03-17  9:39   ` Stephen Rothwell
2016-03-17 16:52   ` Dave Hansen
  -- strict thread matches above, loose matches on Subject: below --
2023-04-11  3:59 Stephen Rothwell
2019-11-27  0:18 Stephen Rothwell
2019-10-10  1:51 Stephen Rothwell
2019-11-27 23:36 ` Stephen Rothwell
2017-02-17  1:56 Stephen Rothwell
2017-02-01  3:38 Stephen Rothwell
2016-11-17  2:59 Stephen Rothwell
2014-03-24  3:38 Stephen Rothwell
2012-03-13  5:11 Stephen Rothwell

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=2913254.nLUtoX01AU@wuerfel \
    --to=arnd@arndb.de \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.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;
as well as URLs for NNTP newsgroup(s).