linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the arm64 tree with the mm-unstable tree
@ 2025-11-19 23:25 Stephen Rothwell
  2025-11-20  1:36 ` Huang, Ying
  2025-12-04  2:02 ` Stephen Rothwell
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-11-19 23:25 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Andrew Morton
  Cc: Huang Ying, Linux Kernel Mailing List, Linux Next Mailing List,
	Lorenzo Stoakes

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

Hi all,

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

  mm/memory.c

between commit:

  b08b123ead1a ("mm: avoid unnecessary use of is_swap_pmd()")

from the mm-unstable tree and commit:

  79301c7d605a ("mm: add spurious fault fixing support for huge pmd")

from the arm64 tree.

I fixed it up (I think - 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 mm/memory.c
index 50b93b45b174,6e5a08c4fd2e..000000000000
--- a/mm/memory.c
+++ b/mm/memory.c
@@@ -6342,40 -6314,37 +6369,43 @@@ retry_pud
  	if (pmd_none(*vmf.pmd) &&
  	    thp_vma_allowable_order(vma, vm_flags, TVA_PAGEFAULT, PMD_ORDER)) {
  		ret = create_huge_pmd(&vmf);
 -		if (!(ret & VM_FAULT_FALLBACK))
 +		if (ret & VM_FAULT_FALLBACK)
 +			goto fallback;
 +		else
  			return ret;
 -	} else {
 -		vmf.orig_pmd = pmdp_get_lockless(vmf.pmd);
 +	}
  
 -		if (unlikely(is_swap_pmd(vmf.orig_pmd))) {
 -			VM_BUG_ON(thp_migration_supported() &&
 -					  !is_pmd_migration_entry(vmf.orig_pmd));
 -			if (is_pmd_migration_entry(vmf.orig_pmd))
 -				pmd_migration_entry_wait(mm, vmf.pmd);
 +	vmf.orig_pmd = pmdp_get_lockless(vmf.pmd);
 +	if (pmd_none(vmf.orig_pmd))
 +		goto fallback;
 +
 +	if (unlikely(!pmd_present(vmf.orig_pmd))) {
 +		if (pmd_is_device_private_entry(vmf.orig_pmd))
 +			return do_huge_pmd_device_private(&vmf);
 +
 +		if (pmd_is_migration_entry(vmf.orig_pmd))
 +			pmd_migration_entry_wait(mm, vmf.pmd);
 +		return 0;
 +	}
 +	if (pmd_trans_huge(vmf.orig_pmd)) {
 +		if (pmd_protnone(vmf.orig_pmd) && vma_is_accessible(vma))
 +			return do_huge_pmd_numa_page(&vmf);
 +
 +		if ((flags & (FAULT_FLAG_WRITE|FAULT_FLAG_UNSHARE)) &&
 +		    !pmd_write(vmf.orig_pmd)) {
 +			ret = wp_huge_pmd(&vmf);
 +			if (!(ret & VM_FAULT_FALLBACK))
 +				return ret;
 +		} else {
- 			huge_pmd_set_accessed(&vmf);
++			vmf.ptl = pmd_lock(mm, vmf.pmd);
++			if (!huge_pmd_set_accessed(&vmf))
++				fix_spurious_fault(&vmf, PGTABLE_LEVEL_PMD);
++			spin_unlock(vmf.ptl);
  			return 0;
  		}
 -		if (pmd_trans_huge(vmf.orig_pmd)) {
 -			if (pmd_protnone(vmf.orig_pmd) && vma_is_accessible(vma))
 -				return do_huge_pmd_numa_page(&vmf);
 -
 -			if ((flags & (FAULT_FLAG_WRITE|FAULT_FLAG_UNSHARE)) &&
 -			    !pmd_write(vmf.orig_pmd)) {
 -				ret = wp_huge_pmd(&vmf);
 -				if (!(ret & VM_FAULT_FALLBACK))
 -					return ret;
 -			} else {
 -				vmf.ptl = pmd_lock(mm, vmf.pmd);
 -				if (!huge_pmd_set_accessed(&vmf))
 -					fix_spurious_fault(&vmf, PGTABLE_LEVEL_PMD);
 -				spin_unlock(vmf.ptl);
 -				return 0;
 -			}
 -		}
  	}
  
 +fallback:
  	return handle_pte_fault(&vmf);
  }
  

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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* linux-next: manual merge of the arm64 tree with the mm-unstable tree
@ 2025-11-14  0:21 Stephen Rothwell
  2025-12-04  2:00 ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-11-14  0:21 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Cc: Andrew Morton
  Cc: Anshuman Khandual, Chaitanya S Prakash, Linu Cherian,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  arch/arm64/mm/mmu.c

between commit:

  2b9cdb805fcd ("mm: make INVALID_PHYS_ADDR a generic macro")

from the mm-unstable tree and commit:

  bfc184cb1ba7 ("arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors")

from the arm64 tree.

I fixed it up (the latter moved the INVALID_PHYS_ADDR define so I removed
it from its new place, and there was no conflict left) 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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-04  5:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-19 23:25 linux-next: manual merge of the arm64 tree with the mm-unstable tree Stephen Rothwell
2025-11-20  1:36 ` Huang, Ying
2025-12-04  2:02 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2025-11-14  0:21 Stephen Rothwell
2025-12-04  2:00 ` Stephen Rothwell
2025-12-04  3:25   ` Anshuman Khandual
2025-12-04  5:56     ` Stephen Rothwell

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