linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	PowerPC <linuxppc-dev@lists.ozlabs.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Ira Weiny <ira.weiny@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: linux-next: manual merge of the akpm-current tree with the powerpc-fixes tree
Date: Tue, 23 Apr 2019 19:06:06 +1000	[thread overview]
Message-ID: <20190423190606.0fefb856@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the akpm-current tree got a conflict in:

  arch/powerpc/mm/mmu_context_iommu.c

between commits:

  eb9d7a62c386 ("powerpc/mm_iommu: Fix potential deadlock")
  7a3a4d763837 ("powerpc/mm_iommu: Allow pinning large regions")

from the powerpc-fixes tree and commit:

  02f506bad7af ("mm/gup: replace get_user_pages_longterm() with FOLL_LONGTERM")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/mm/mmu_context_iommu.c
index 8330f135294f,755fe7adc0d8..000000000000
--- a/arch/powerpc/mm/mmu_context_iommu.c
+++ b/arch/powerpc/mm/mmu_context_iommu.c
@@@ -135,27 -144,18 +131,28 @@@ static long mm_iommu_do_alloc(struct mm
  	}
  
  	down_read(&mm->mmap_sem);
 -	ret = get_user_pages(ua, entries, FOLL_WRITE | FOLL_LONGTERM,
 -			     mem->hpages, NULL);
 +	chunk = (1UL << (PAGE_SHIFT + MAX_ORDER - 1)) /
 +			sizeof(struct vm_area_struct *);
 +	chunk = min(chunk, entries);
 +	for (entry = 0; entry < entries; entry += chunk) {
 +		unsigned long n = min(entries - entry, chunk);
 +
- 		ret = get_user_pages_longterm(ua + (entry << PAGE_SHIFT), n,
- 				FOLL_WRITE, mem->hpages + entry, NULL);
++		ret = get_user_pages(ua + (entry << PAGE_SHIFT), n,
++				     FOLL_WRITE | FOLL_LONGTERM,
++				     mem->hpages + entry, NULL);
 +		if (ret == n) {
 +			pinned += n;
 +			continue;
 +		}
 +		if (ret > 0)
 +			pinned += ret;
 +		break;
 +	}
  	up_read(&mm->mmap_sem);
 -	if (ret != entries) {
 -		/* free the reference taken */
 -		for (i = 0; i < ret; i++)
 -			put_page(mem->hpages[i]);
 -
 -		vfree(mem->hpas);
 -		kfree(mem);
 -		ret = -EFAULT;
 -		goto unlock_exit;
 +	if (pinned != entries) {
 +		if (!ret)
 +			ret = -EFAULT;
 +		goto free_exit;
  	}
  
  	pageshift = PAGE_SHIFT;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-04-23  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  9:06 Stephen Rothwell [this message]
2019-04-23 17:00 ` linux-next: manual merge of the akpm-current tree with the powerpc-fixes tree Ira Weiny
  -- strict thread matches above, loose matches on Subject: below --
2019-02-06  5:15 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=20190423190606.0fefb856@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=aik@ozlabs.ru \
    --cc=akpm@linux-foundation.org \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).