From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Rothwell Subject: Re: linux-next: manual merge of the akpm-current tree with the drm tree Date: Mon, 15 Jul 2019 11:11:44 +1000 Message-ID: <20190715111144.24d303df@canb.auug.org.au> References: <20190624204908.64a33862@canb.auug.org.au> <20190624210659.152a20bb@canb.auug.org.au> <20190709100645.5302a5c9@canb.auug.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1586331079==" Return-path: Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 210AD89829 for ; Mon, 15 Jul 2019 01:11:48 +0000 (UTC) In-Reply-To: <20190709100645.5302a5c9@canb.auug.org.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dave Airlie , DRI Cc: Andrew Morton , Linux Next Mailing List , Linux Kernel Mailing List , Anshuman Khandual , Thomas Hellstrom List-Id: dri-devel@lists.freedesktop.org --===============1586331079== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/KRQeiCZ1x+C30jKBozlhXat"; protocol="application/pgp-signature" --Sig_/KRQeiCZ1x+C30jKBozlhXat Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Tue, 9 Jul 2019 10:06:45 +1000 Stephen Rothwell w= rote: > > On Mon, 24 Jun 2019 21:06:59 +1000 Stephen Rothwell wrote: > > > > On Mon, 24 Jun 2019 20:49:08 +1000 Stephen Rothwell wrote: =20 > > > > > > Today's linux-next merge of the akpm-current tree got a conflict in: > > >=20 > > > mm/memory.c > > >=20 > > > between commit: > > >=20 > > > 29875a52915e ("mm: Add an apply_to_pfn_range interface") > > >=20 > > > from the drm tree and commit: > > >=20 > > > e972cea08fb3 ("mm/pgtable: drop pgtable_t variable from pte_fn_t fu= nctions") > > >=20 > > > from the akpm-current tree. > > >=20 > > > I fixed it up (see below my signature, then added the following merge > > > resolution patch as well) 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 t= ree > > > is submitted for merging. You may also want to consider cooperating > > > with the maintainer of the conflicting tree to minimise any particula= rly > > > complex conflicts. > > >=20 > > > From: Stephen Rothwell > > > Date: Mon, 24 Jun 2019 20:40:46 +1000 > > > Subject: [PATCH] merge fixup for "mm: Add an apply_to_pfn_range inter= face" > > >=20 > > > Signed-off-by: Stephen Rothwell > > > --- > > > include/linux/mm.h | 2 +- > > > mm/as_dirty_helpers.c | 8 ++------ > > > 2 files changed, 3 insertions(+), 7 deletions(-) > > >=20 > > > diff --git a/include/linux/mm.h b/include/linux/mm.h > > > index 87d53de3dee4..4404e18443ef 100644 > > > --- a/include/linux/mm.h > > > +++ b/include/linux/mm.h > > > @@ -2673,7 +2673,7 @@ extern int apply_to_page_range(struct mm_struct= *mm, unsigned long address, > > > unsigned long size, pte_fn_t fn, void *data); > > > =20 > > > struct pfn_range_apply; > > > -typedef int (*pter_fn_t)(pte_t *pte, pgtable_t token, unsigned long = addr, > > > +typedef int (*pter_fn_t)(pte_t *pte, unsigned long addr, > > > struct pfn_range_apply *closure); > > > struct pfn_range_apply { > > > struct mm_struct *mm; > > > diff --git a/mm/as_dirty_helpers.c b/mm/as_dirty_helpers.c > > > index f600e31534fb..7c863626c2a4 100644 > > > --- a/mm/as_dirty_helpers.c > > > +++ b/mm/as_dirty_helpers.c > > > @@ -26,7 +26,6 @@ struct apply_as { > > > /** > > > * apply_pt_wrprotect - Leaf pte callback to write-protect a pte > > > * @pte: Pointer to the pte > > > - * @token: Page table token, see apply_to_pfn_range() > > > * @addr: The virtual page address > > > * @closure: Pointer to a struct pfn_range_apply embedded in a > > > * struct apply_as > > > @@ -36,8 +35,7 @@ struct apply_as { > > > * > > > * Return: Always zero. > > > */ > > > -static int apply_pt_wrprotect(pte_t *pte, pgtable_t token, > > > - unsigned long addr, > > > +static int apply_pt_wrprotect(pte_t *pte, unsigned long addr, > > > struct pfn_range_apply *closure) > > > { > > > struct apply_as *aas =3D container_of(closure, typeof(*aas), base); > > > @@ -78,7 +76,6 @@ struct apply_as_clean { > > > /** > > > * apply_pt_clean - Leaf pte callback to clean a pte > > > * @pte: Pointer to the pte > > > - * @token: Page table token, see apply_to_pfn_range() > > > * @addr: The virtual page address > > > * @closure: Pointer to a struct pfn_range_apply embedded in a > > > * struct apply_as_clean > > > @@ -91,8 +88,7 @@ struct apply_as_clean { > > > * > > > * Return: Always zero. > > > */ > > > -static int apply_pt_clean(pte_t *pte, pgtable_t token, > > > - unsigned long addr, > > > +static int apply_pt_clean(pte_t *pte, unsigned long addr, > > > struct pfn_range_apply *closure) > > > { > > > struct apply_as *aas =3D container_of(closure, typeof(*aas), base); > > > --=20 > > > 2.20.1 > > >=20 > > > --=20 > > > Cheers, > > > Stephen Rothwell > > >=20 > > > diff --cc mm/memory.c > > > index 462aa47f8878,f8a75528658a..e7e37fcbd687 > > > --- a/mm/memory.c > > > +++ b/mm/memory.c > > > @@@ -2037,12 -2036,11 +2035,11 @@@ static int apply_to_pte_range(stru= ct pf > > > { > > > pte_t *pte; > > > int err; > > > - pgtable_t token; > > > spinlock_t *uninitialized_var(ptl); > > > =20 > > > - pte =3D (mm =3D=3D &init_mm) ? > > > + pte =3D (closure->mm =3D=3D &init_mm) ? > > > pte_alloc_kernel(pmd, addr) : > > > - pte_alloc_map_lock(mm, pmd, addr, &ptl); > > > + pte_alloc_map_lock(closure->mm, pmd, addr, &ptl); > > > if (!pte) > > > return -ENOMEM; > > > =20 > > > @@@ -2050,10 -2048,8 +2047,8 @@@ > > > =20 > > > arch_enter_lazy_mmu_mode(); > > > =20 > > > - token =3D pmd_pgtable(*pmd); > > > -=20 > > > do { > > > - err =3D closure->ptefn(pte++, token, addr, closure); > > > - err =3D fn(pte++, addr, data); > > > ++ err =3D closure->ptefn(pte++, addr, closure); > > > if (err) > > > break; > > > } while (addr +=3D PAGE_SIZE, addr !=3D end); =20 > >=20 > > I also needed this: > >=20 > > From: Stephen Rothwell > > Date: Mon, 24 Jun 2019 21:04:14 +1000 > > Subject: [PATCH] another fixup for "mm: Add an apply_to_pfn_range inter= face" > >=20 > > Signed-off-by: Stephen Rothwell > > --- > > mm/memory.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > >=20 > > diff --git a/mm/memory.c b/mm/memory.c > > index e7e37fcbd687..81d71fbfca5a 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -2189,14 +2189,13 @@ struct page_range_apply { > > * Callback wrapper to enable use of apply_to_pfn_range for > > * the apply_to_page_range interface > > */ > > -static int apply_to_page_range_wrapper(pte_t *pte, pgtable_t token, > > - unsigned long addr, > > +static int apply_to_page_range_wrapper(pte_t *pte, unsigned long addr, > > struct pfn_range_apply *pter) > > { > > struct page_range_apply *pra =3D > > container_of(pter, typeof(*pra), pter); > > =20 > > - return pra->fn(pte, token, addr, pra->data); > > + return pra->fn(pte, addr, pra->data); > > } > > =20 > > /* > > --=20 > > 2.20.1 =20 >=20 > I am still getting this conflict (the commit ids may have changed). > Just a reminder in case you think Linus may need to know. >=20 These fix ups are now needed when merging the drm tree into Linus' tree. --=20 Cheers, Stephen Rothwell --Sig_/KRQeiCZ1x+C30jKBozlhXat Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAl0r0tAACgkQAVBC80lX 0GzzHQf+O4zxvTgB10N5ktRcxSE7/iq5c8Ax5VPj7Ipdslj4Tm76ou2vXNfK0am9 PnDLzpRRIxp5t5sDEdYcZRdQZXYL5BVCeLRM7FDozj3HwORK8oVPYpvwgz7A0uKT c3qeRwi5yRjJdOuRdf1UFmyh4/AG4BN4+H2GkHKsau1FPr/4De7TsqBxovZVi7aC HFDz6Sl0zCT0U2iCbcM+8BDa71NA+ls/LeAWi7ZEoHZxXxbC/zVV7iZZ753yBg/o jexNlkl5aFA8pYVsiDclDso5mEWtPTi6SHckLJ9/O0bJChrEbDcyUy9SWCKUXpTP Ecmj/O1JR00qH16IXXdEw+gmYhCR7A== =F+tm -----END PGP SIGNATURE----- --Sig_/KRQeiCZ1x+C30jKBozlhXat-- --===============1586331079== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1586331079==--