Skip to contentSkip to conversation

linux-next: manual merge of the akpm-current tree with the drm tree

PATCH Stephen Rothwell 1 participant 4 messages Jun 24, 2019 – Jul 15, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

mm/memory.c

between commit:

29875a52915e ("mm: Add an apply_to_pfn_range interface")

from the drm tree and commit:

e972cea08fb3 ("mm/pgtable: drop pgtable_t variable from pte_fn_t functions")

from the akpm-current tree.

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 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 20:40:46 +1000
Subject: [PATCH] merge fixup for "mm: Add an apply_to_pfn_range interface"

---
 include/linux/mm.h    | 2 +-
 mm/as_dirty_helpers.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)
include/linux/mm.h +1 -1
index 87d53de3dee4..4404e18443ef 100644
@@ -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);
 
 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;
mm/as_dirty_helpers.c +2 -6
index f600e31534fb..7c863626c2a4 100644
@@ -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 = 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 = container_of(closure, typeof(*aas), base);
Signature · 38 lines
2.20.1

-- 
Cheers,
Stephen Rothwell

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(struct pf
  {
  	pte_t *pte;
  	int err;
- 	pgtable_t token;
  	spinlock_t *uninitialized_var(ptl);
  
 -	pte = (mm == &init_mm) ?
 +	pte = (closure->mm == &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;
  
@@@ -2050,10 -2048,8 +2047,8 @@@
  
  	arch_enter_lazy_mmu_mode();
  
- 	token = pmd_pgtable(*pmd);
- 
  	do {
- 		err = closure->ptefn(pte++, token, addr, closure);
 -		err = fn(pte++, addr, data);
++		err = closure->ptefn(pte++, addr, closure);
  		if (err)
  			break;
  	} while (addr += PAGE_SIZE, addr != end);
#1 lore raw

Hi all,

Quoted 115 lines · On Mon, 24 Jun 2019 20:49:08 +1000 Stephen Rothwell <[email protected]>…

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

mm/memory.c

between commit:

29875a52915e ("mm: Add an apply_to_pfn_range interface")

from the drm tree and commit:

e972cea08fb3 ("mm/pgtable: drop pgtable_t variable from pte_fn_t functions")

from the akpm-current tree.

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 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 20:40:46 +1000
Subject: [PATCH] merge fixup for "mm: Add an apply_to_pfn_range interface"

---
 include/linux/mm.h    | 2 +-
 mm/as_dirty_helpers.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)
include/linux/mm.h +1 -1
index 87d53de3dee4..4404e18443ef 100644
@@ -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);
 
 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;
mm/as_dirty_helpers.c +2 -6
index f600e31534fb..7c863626c2a4 100644
@@ -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 = 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 = container_of(closure, typeof(*aas), base);
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell
mm/memory.c +0 -1
diff --cc mm/memory.c
index 462aa47f8878,f8a75528658a..e7e37fcbd687
@@@ -2037,12 -2036,11 +2035,11 @@@ static int apply_to_pte_range(struct pf
  {
  	pte_t *pte;
  	int err;
- 	pgtable_t token;
  	spinlock_t *uninitialized_var(ptl);
 
 -	pte = (mm == &init_mm) ?
 +	pte = (closure->mm == &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;
@@@ -2050,10 -2048,8 +2047,8 @@@
 
  	arch_enter_lazy_mmu_mode();

mm/memory.c

Quoted 10 lines
mm/memory.c +1 -3
 
- 	token = pmd_pgtable(*pmd);
- 
  	do {
- 		err = closure->ptefn(pte++, token, addr, closure);
 -		err = fn(pte++, addr, data);
++		err = closure->ptefn(pte++, addr, closure);
  		if (err)
  			break;
  	} while (addr += PAGE_SIZE, addr != end);

I also needed this:

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 21:04:14 +1000
Subject: [PATCH] another fixup for "mm: Add an apply_to_pfn_range interface"

---
 mm/memory.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/memory.c +2 -3
index e7e37fcbd687..81d71fbfca5a 100644
@@ -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 =
 		container_of(pter, typeof(*pra), pter);
 
-	return pra->fn(pte, token, addr, pra->data);
+	return pra->fn(pte, addr, pra->data);
 }
 
 /*
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell
#2 lore raw

Hi all,

Quoted 162 lines · On Mon, 24 Jun 2019 21:06:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 115 lines · On Mon, 24 Jun 2019 20:49:08 +1000 Stephen Rothwell <[email protected]>…

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

mm/memory.c

between commit:

29875a52915e ("mm: Add an apply_to_pfn_range interface")

from the drm tree and commit:

e972cea08fb3 ("mm/pgtable: drop pgtable_t variable from pte_fn_t functions")

from the akpm-current tree.

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 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 20:40:46 +1000
Subject: [PATCH] merge fixup for "mm: Add an apply_to_pfn_range interface"

---
 include/linux/mm.h    | 2 +-
 mm/as_dirty_helpers.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)
include/linux/mm.h +1 -1
index 87d53de3dee4..4404e18443ef 100644
@@ -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);
 
 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;
mm/as_dirty_helpers.c +2 -6
index f600e31534fb..7c863626c2a4 100644
@@ -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 = 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 = container_of(closure, typeof(*aas), base);
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell
mm/memory.c +0 -1
diff --cc mm/memory.c
index 462aa47f8878,f8a75528658a..e7e37fcbd687
@@@ -2037,12 -2036,11 +2035,11 @@@ static int apply_to_pte_range(struct pf
  {
  	pte_t *pte;
  	int err;
- 	pgtable_t token;
  	spinlock_t *uninitialized_var(ptl);
 
 -	pte = (mm == &init_mm) ?
 +	pte = (closure->mm == &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;
@@@ -2050,10 -2048,8 +2047,8 @@@
 
  	arch_enter_lazy_mmu_mode();

mm/memory.c

Quoted 10 lines
mm/memory.c +1 -3
 
- 	token = pmd_pgtable(*pmd);
- 
  	do {
- 		err = closure->ptefn(pte++, token, addr, closure);
 -		err = fn(pte++, addr, data);
++		err = closure->ptefn(pte++, addr, closure);
  		if (err)
  			break;
  	} while (addr += PAGE_SIZE, addr != end);  

I also needed this:

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 21:04:14 +1000
Subject: [PATCH] another fixup for "mm: Add an apply_to_pfn_range interface"

---
 mm/memory.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/memory.c +2 -3
index e7e37fcbd687..81d71fbfca5a 100644
@@ -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 =
 		container_of(pter, typeof(*pra), pter);
 
-	return pra->fn(pte, token, addr, pra->data);
+	return pra->fn(pte, addr, pra->data);
 }
 
 /*
Signature · 1 line
2.20.1

I am still getting this conflict (the commit ids may have changed). Just a reminder in case you think Linus may need to know.

Signature · 2 lines
Cheers,
Stephen Rothwell

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hi all,

Quoted 161 lines · On Tue, 9 Jul 2019 10:06:45 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 159 lines · On Mon, 24 Jun 2019 21:06:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 115 lines · On Mon, 24 Jun 2019 20:49:08 +1000 Stephen Rothwell <[email protected]>…

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

mm/memory.c

between commit:

29875a52915e ("mm: Add an apply_to_pfn_range interface")

from the drm tree and commit:

e972cea08fb3 ("mm/pgtable: drop pgtable_t variable from pte_fn_t functions")

from the akpm-current tree.

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 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 20:40:46 +1000
Subject: [PATCH] merge fixup for "mm: Add an apply_to_pfn_range interface"

---
 include/linux/mm.h    | 2 +-
 mm/as_dirty_helpers.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)
include/linux/mm.h +1 -1
index 87d53de3dee4..4404e18443ef 100644
@@ -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);
 
 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;
mm/as_dirty_helpers.c +2 -6
index f600e31534fb..7c863626c2a4 100644
@@ -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 = 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 = container_of(closure, typeof(*aas), base);
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell
mm/memory.c +0 -1
diff --cc mm/memory.c
index 462aa47f8878,f8a75528658a..e7e37fcbd687
@@@ -2037,12 -2036,11 +2035,11 @@@ static int apply_to_pte_range(struct pf
  {
  	pte_t *pte;
  	int err;
- 	pgtable_t token;
  	spinlock_t *uninitialized_var(ptl);
 
 -	pte = (mm == &init_mm) ?
 +	pte = (closure->mm == &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;
@@@ -2050,10 -2048,8 +2047,8 @@@
 
  	arch_enter_lazy_mmu_mode();

mm/memory.c

Quoted 10 lines
mm/memory.c +1 -3
 
- 	token = pmd_pgtable(*pmd);
- 
  	do {
- 		err = closure->ptefn(pte++, token, addr, closure);
 -		err = fn(pte++, addr, data);
++		err = closure->ptefn(pte++, addr, closure);
  		if (err)
  			break;
  	} while (addr += PAGE_SIZE, addr != end);    

I also needed this:

From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Jun 2019 21:04:14 +1000
Subject: [PATCH] another fixup for "mm: Add an apply_to_pfn_range interface"

---
 mm/memory.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/memory.c +2 -3
index e7e37fcbd687..81d71fbfca5a 100644
@@ -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 =
 		container_of(pter, typeof(*pra), pter);
 
-	return pra->fn(pte, token, addr, pra->data);
+	return pra->fn(pte, addr, pra->data);
 }
 
Quoted 7 lines
Quoted 3 lines
mm/memory.c +0 -0
 /*
Signature · 1 line
2.20.1  

I am still getting this conflict (the commit ids may have changed). Just a reminder in case you think Linus may need to know.

These fix ups are now needed when merging the drm tree into Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel