* 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* Re: linux-next: manual merge of the arm64 tree with the mm-unstable tree
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
1 sibling, 0 replies; 7+ messages in thread
From: Huang, Ying @ 2025-11-20 1:36 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Catalin Marinas, Will Deacon, Andrew Morton,
Linux Kernel Mailing List, Linux Next Mailing List,
Lorenzo Stoakes
Hi, Stephen,
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> 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.
The fix looks right to me. Thanks!
---
Best Regards,
Huang, Ying
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: linux-next: manual merge of the arm64 tree with the mm-unstable tree
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
1 sibling, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-12-04 2:02 UTC (permalink / raw)
To: Andrew Morton
Cc: Catalin Marinas, Will Deacon, Huang Ying,
Linux Kernel Mailing List, Linux Next Mailing List,
Lorenzo Stoakes, Huang, Ying
[-- Attachment #1: Type: text/plain, Size: 3359 bytes --]
Hi all,
On Thu, 20 Nov 2025 10:25:32 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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.
>
>
> 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);
> }
>
This is now a conflict between the mm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- 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* Re: 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
2025-12-04 3:25 ` Anshuman Khandual
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-12-04 2:00 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: 1059 bytes --]
Hi all,
On Fri, 14 Nov 2025 11:21:44 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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.
This is now a conflict between the mm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: linux-next: manual merge of the arm64 tree with the mm-unstable tree
2025-12-04 2:00 ` Stephen Rothwell
@ 2025-12-04 3:25 ` Anshuman Khandual
2025-12-04 5:56 ` Stephen Rothwell
0 siblings, 1 reply; 7+ messages in thread
From: Anshuman Khandual @ 2025-12-04 3:25 UTC (permalink / raw)
To: Stephen Rothwell, Catalin Marinas, Will Deacon, Cc: Andrew Morton
Cc: Chaitanya S Prakash, Linu Cherian, Linux Kernel Mailing List,
Linux Next Mailing List
On 04/12/25 7:30 AM, Stephen Rothwell wrote:
> Hi all,
>
> On Fri, 14 Nov 2025 11:21:44 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> 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.
>
> This is now a conflict between the mm-stable tree and Linus' tree.
Should this be rebased against Linus's tree in mm-stable first before the pull request ?
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: linux-next: manual merge of the arm64 tree with the mm-unstable tree
2025-12-04 3:25 ` Anshuman Khandual
@ 2025-12-04 5:56 ` Stephen Rothwell
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-12-04 5:56 UTC (permalink / raw)
To: Anshuman Khandual
Cc: Catalin Marinas, Will Deacon, Andrew Morton, Chaitanya S Prakash,
Linu Cherian, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]
Hi Anshuman,
On Thu, 4 Dec 2025 08:55:54 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
> On 04/12/25 7:30 AM, Stephen Rothwell wrote:
> > Hi all,
> >
> > On Fri, 14 Nov 2025 11:21:44 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >>
> >> 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.
> >
> > This is now a conflict between the mm-stable tree and Linus' tree.
>
> Should this be rebased against Linus's tree in mm-stable first before the pull request ?
No, it should just be mentioned to Linus in he PR. He would figure it
out anyway.
--
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).