linux-next: manual merge of the mm-stable tree with the mm-hotfixes tree

Mark Brown posted 1 patch 6 days, 10 hours ago
linux-next: manual merge of the mm-stable tree with the mm-hotfixes tree
Posted by Mark Brown 6 days, 10 hours ago
Hi all,

Today's linux-next merge of the mm-stable tree got a conflict in:

  arch/riscv/include/asm/pgtable.h

between commit:

  668208b161a0b ("riscv: use an atomic xchg in pudp_huge_get_and_clear()")

from the mm-hotfixes tree and commit:

  546e42c8c6d94 ("riscv: Use an atomic xchg in pudp_huge_get_and_clear()")

from the mm-stable 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.

diff --cc arch/riscv/include/asm/pgtable.h
index 8150677429398,e69346307e786..0000000000000
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@@ -944,15 -944,9 +944,15 @@@ static inline int pudp_test_and_clear_y
  
  #define __HAVE_ARCH_PUDP_HUGE_GET_AND_CLEAR
  static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm,
- 					    unsigned long address,  pud_t *pudp)
+ 					    unsigned long address, pud_t *pudp)
  {
 +#ifdef CONFIG_SMP
- 	pud_t pud = __pud(xchg(&pudp->pud, 0));
+ 	pud_t pud = __pud(atomic_long_xchg((atomic_long_t *)pudp, 0));
 +#else
 +	pud_t pud = *pudp;
 +
 +	pud_clear(pudp);
 +#endif
  
  	page_table_check_pud_clear(mm, pud);
  
Re: linux-next: manual merge of the mm-stable tree with the mm-hotfixes tree
Posted by Andrew Morton 6 days, 5 hours ago
On Thu, 25 Sep 2025 13:59:06 +0100 Mark Brown <broonie@kernel.org> wrote:

> Hi all,
> 
> Today's linux-next merge of the mm-stable tree got a conflict in:
> 
>   arch/riscv/include/asm/pgtable.h
> 
> between commit:
> 
>   668208b161a0b ("riscv: use an atomic xchg in pudp_huge_get_and_clear()")
> 
> from the mm-hotfixes tree and commit:

This is in the mm-stable tree.

>   546e42c8c6d94 ("riscv: Use an atomic xchg in pudp_huge_get_and_clear()")
> 
> from the mm-stable tree.

And this will be from a riscv tree, I assume.

> I fixed it up (see below) and can carry the fix as necessary.

Please just take the version from the riscv tree.