* [PATCH V1 0/2] mm: MISC follow-up patches for linux/pgalloc.h
@ 2025-10-19 7:25 Harry Yoo
2025-10-19 7:25 ` [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section Harry Yoo
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
0 siblings, 2 replies; 16+ messages in thread
From: Harry Yoo @ 2025-10-19 7:25 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, Harry Yoo
Hi folks.
This is a follow-up patch series for the patch series named:
"[PATCH V5 mm-hotfixes 0/3] mm, x86: fix crash due to missing page table
sync and make it harder to miss".
This is a follow-up for MM. For x86/mm specific cleanup patches,
another follow-up series is planned.
Patch 1 creates a F: entry to MAINTAINERS file in MM CORE section.
Patch 2 converts common code to include <linux/pgalloc.h> instead of
<asm/pgalloc.h>
[1] https://lore.kernel.org/linux-mm/20250818020206.4517-1-harry.yoo@oracle.com/
Harry Yoo (2):
MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
treewide: include linux/pgalloc.h instead of asm/pgalloc.h
MAINTAINERS | 1 +
drivers/firmware/efi/arm-runtime.c | 2 +-
drivers/firmware/efi/riscv-runtime.c | 2 +-
drivers/s390/char/sclp_sd.c | 3 +--
fs/dax.c | 2 +-
kernel/fork.c | 2 +-
mm/debug_vm_pgtable.c | 2 +-
mm/filemap.c | 2 +-
mm/huge_memory.c | 2 +-
mm/hugetlb.c | 2 +-
mm/hugetlb_vmemmap.c | 2 +-
mm/khugepaged.c | 2 +-
mm/memory.c | 2 +-
mm/mmu_gather.c | 2 +-
mm/mremap.c | 2 +-
mm/pgtable-generic.c | 2 +-
mm/pt_reclaim.c | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-19 7:25 [PATCH V1 0/2] mm: MISC follow-up patches for linux/pgalloc.h Harry Yoo
@ 2025-10-19 7:25 ` Harry Yoo
2025-10-19 22:07 ` SeongJae Park
2025-10-20 14:34 ` Mike Rapoport
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
1 sibling, 2 replies; 16+ messages in thread
From: Harry Yoo @ 2025-10-19 7:25 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, Harry Yoo
Since include/linux/pgtable.h is already listed in the MM CORE section,
add it to the section as well to keep it maintained by the appropriate
maintainers.
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 46126ce2f968..dedb9525c2bc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
F: include/linux/mmu_notifier.h
F: include/linux/pagewalk.h
F: include/linux/pgtable.h
+F: include/linux/pgalloc.h
F: include/linux/ptdump.h
F: include/linux/vmpressure.h
F: include/linux/vmstat.h
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-19 7:25 [PATCH V1 0/2] mm: MISC follow-up patches for linux/pgalloc.h Harry Yoo
2025-10-19 7:25 ` [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section Harry Yoo
@ 2025-10-19 7:25 ` Harry Yoo
2025-10-20 13:39 ` David Hildenbrand
` (2 more replies)
1 sibling, 3 replies; 16+ messages in thread
From: Harry Yoo @ 2025-10-19 7:25 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, Harry Yoo
For now, including <asm/pgalloc.h> instead of <linux/pgalloc.h>
is technically fine unless the .c file calls p*d_populate_kernel()
helper functions.
But it is a better practice to always include <linux/pgalloc.h>.
Include <linux/pgalloc.h> instead of <asm/pgalloc.h> outside arch/.
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
---
drivers/firmware/efi/arm-runtime.c | 2 +-
drivers/firmware/efi/riscv-runtime.c | 2 +-
drivers/s390/char/sclp_sd.c | 3 +--
fs/dax.c | 2 +-
kernel/fork.c | 2 +-
mm/debug_vm_pgtable.c | 2 +-
mm/filemap.c | 2 +-
mm/huge_memory.c | 2 +-
mm/hugetlb.c | 2 +-
mm/hugetlb_vmemmap.c | 2 +-
mm/khugepaged.c | 2 +-
mm/memory.c | 2 +-
mm/mmu_gather.c | 2 +-
mm/mremap.c | 2 +-
mm/pgtable-generic.c | 2 +-
mm/pt_reclaim.c | 2 +-
16 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
index 83092d93f36a..2e3b5131df32 100644
--- a/drivers/firmware/efi/arm-runtime.c
+++ b/drivers/firmware/efi/arm-runtime.c
@@ -19,11 +19,11 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/pgtable.h>
+#include <linux/pgalloc.h>
#include <asm/cacheflush.h>
#include <asm/efi.h>
#include <asm/mmu.h>
-#include <asm/pgalloc.h>
#if defined(CONFIG_PTDUMP_DEBUGFS) || defined(CONFIG_ARM_PTDUMP_DEBUGFS)
#include <asm/ptdump.h>
diff --git a/drivers/firmware/efi/riscv-runtime.c b/drivers/firmware/efi/riscv-runtime.c
index fa71cd898120..5b8d72885fee 100644
--- a/drivers/firmware/efi/riscv-runtime.c
+++ b/drivers/firmware/efi/riscv-runtime.c
@@ -21,11 +21,11 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/pgtable.h>
+#include <linux/pgalloc.h>
#include <asm/cacheflush.h>
#include <asm/efi.h>
#include <asm/mmu.h>
-#include <asm/pgalloc.h>
static bool __init efi_virtmap_init(void)
{
diff --git a/drivers/s390/char/sclp_sd.c b/drivers/s390/char/sclp_sd.c
index 129b89fe40a3..7a791cb35aea 100644
--- a/drivers/s390/char/sclp_sd.c
+++ b/drivers/s390/char/sclp_sd.c
@@ -17,8 +17,7 @@
#include <linux/vmalloc.h>
#include <linux/async.h>
#include <linux/mutex.h>
-
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include "sclp.h"
diff --git a/fs/dax.c b/fs/dax.c
index 89f071ba7b10..1c78fc02462c 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -24,7 +24,7 @@
#include <linux/mmu_notifier.h>
#include <linux/iomap.h>
#include <linux/rmap.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#define CREATE_TRACE_POINTS
#include <trace/events/fs_dax.h>
diff --git a/kernel/fork.c b/kernel/fork.c
index 3da0f08615a9..9d48646e659f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -107,7 +107,7 @@
#include <linux/tick.h>
#include <linux/unwind_deferred.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/cacheflush.h>
diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
index 830107b6dd08..25a823bddb92 100644
--- a/mm/debug_vm_pgtable.c
+++ b/mm/debug_vm_pgtable.c
@@ -30,9 +30,9 @@
#include <linux/sched/mm.h>
#include <linux/io.h>
#include <linux/vmalloc.h>
+#include <linux/pgalloc.h>
#include <asm/cacheflush.h>
-#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
/*
diff --git a/mm/filemap.c b/mm/filemap.c
index 893ba49808b7..ffcdf4f81d0a 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -48,7 +48,7 @@
#include <linux/rcupdate_wait.h>
#include <linux/sched/mm.h>
#include <linux/sysctl.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include <asm/tlbflush.h>
#include "internal.h"
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index bfb52c564fb3..b4d18172cd53 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -39,9 +39,9 @@
#include <linux/compat.h>
#include <linux/pgalloc_tag.h>
#include <linux/pagewalk.h>
+#include <linux/pgalloc.h>
#include <asm/tlb.h>
-#include <asm/pgalloc.h>
#include "internal.h"
#include "swap.h"
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 86e672fcb305..1ea459723cce 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -39,9 +39,9 @@
#include <linux/memory.h>
#include <linux/mm_inline.h>
#include <linux/padata.h>
+#include <linux/pgalloc.h>
#include <asm/page.h>
-#include <asm/pgalloc.h>
#include <asm/tlb.h>
#include <asm/setup.h>
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index 96ee2bd16ee1..69d71e048e16 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -15,7 +15,7 @@
#include <linux/bootmem_info.h>
#include <linux/mmdebug.h>
#include <linux/pagewalk.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include <asm/tlbflush.h>
#include "hugetlb_vmemmap.h"
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index e947b96e1443..cb2245085879 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -21,9 +21,9 @@
#include <linux/shmem_fs.h>
#include <linux/dax.h>
#include <linux/ksm.h>
+#include <linux/pgalloc.h>
#include <asm/tlb.h>
-#include <asm/pgalloc.h>
#include "internal.h"
#include "mm_slot.h"
diff --git a/mm/memory.c b/mm/memory.c
index 19615bcf234f..449d3c312fcd 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -80,7 +80,7 @@
#include <asm/io.h>
#include <asm/mmu_context.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include <linux/uaccess.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c
index 374aa6f021c6..247e3f9db6c7 100644
--- a/mm/mmu_gather.c
+++ b/mm/mmu_gather.c
@@ -9,8 +9,8 @@
#include <linux/smp.h>
#include <linux/swap.h>
#include <linux/rmap.h>
+#include <linux/pgalloc.h>
-#include <asm/pgalloc.h>
#include <asm/tlb.h>
#ifndef CONFIG_MMU_GATHER_NO_GATHER
diff --git a/mm/mremap.c b/mm/mremap.c
index bd7314898ec5..a7f531c17b79 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -25,10 +25,10 @@
#include <linux/uaccess.h>
#include <linux/userfaultfd_k.h>
#include <linux/mempolicy.h>
+#include <linux/pgalloc.h>
#include <asm/cacheflush.h>
#include <asm/tlb.h>
-#include <asm/pgalloc.h>
#include "internal.h"
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index 0c847cdf4fd3..7b50efe9c477 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -13,7 +13,7 @@
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/mm_inline.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include <asm/tlb.h>
/*
diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
index 7e9455a18aae..ec6fe4eb2644 100644
--- a/mm/pt_reclaim.c
+++ b/mm/pt_reclaim.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/hugetlb.h>
#include <asm-generic/tlb.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
#include "internal.h"
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-19 7:25 ` [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section Harry Yoo
@ 2025-10-19 22:07 ` SeongJae Park
2025-10-20 7:43 ` Harry Yoo
2025-10-20 14:34 ` Mike Rapoport
1 sibling, 1 reply; 16+ messages in thread
From: SeongJae Park @ 2025-10-19 22:07 UTC (permalink / raw)
To: Harry Yoo
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm
On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
> Since include/linux/pgtable.h is already listed in the MM CORE section,
> add it to the section as well to keep it maintained by the appropriate
> maintainers.
>
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Acked-by: SeongJae Park <sj@kernel.org>
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 46126ce2f968..dedb9525c2bc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> F: include/linux/mmu_notifier.h
> F: include/linux/pagewalk.h
> F: include/linux/pgtable.h
> +F: include/linux/pgalloc.h
Nit. Should we alphabetically sort?
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-19 22:07 ` SeongJae Park
@ 2025-10-20 7:43 ` Harry Yoo
2025-10-20 13:38 ` David Hildenbrand
2025-10-20 14:05 ` Lorenzo Stoakes
0 siblings, 2 replies; 16+ messages in thread
From: Harry Yoo @ 2025-10-20 7:43 UTC (permalink / raw)
To: SeongJae Park
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm
On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
> On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
>
> > Since include/linux/pgtable.h is already listed in the MM CORE section,
> > add it to the section as well to keep it maintained by the appropriate
> > maintainers.
> >
> > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
>
> Acked-by: SeongJae Park <sj@kernel.org>
Thanks!
> > ---
> > MAINTAINERS | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 46126ce2f968..dedb9525c2bc 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> > F: include/linux/mmu_notifier.h
> > F: include/linux/pagewalk.h
> > F: include/linux/pgtable.h
> > +F: include/linux/pgalloc.h
>
> Nit. Should we alphabetically sort?
TBH I have no idea.
I thought only subsystem names should be alphabetically sorted?
> Thanks,
> SJ
>
> [...]
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-20 7:43 ` Harry Yoo
@ 2025-10-20 13:38 ` David Hildenbrand
2025-10-20 13:51 ` Harry Yoo
2025-10-20 14:05 ` Lorenzo Stoakes
1 sibling, 1 reply; 16+ messages in thread
From: David Hildenbrand @ 2025-10-20 13:38 UTC (permalink / raw)
To: Harry Yoo, SeongJae Park
Cc: Andrew Morton, Lorenzo Stoakes, Liam R . Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, linux-mm
On 20.10.25 09:43, Harry Yoo wrote:
> On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
>> On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
>>
>>> Since include/linux/pgtable.h is already listed in the MM CORE section,
>>> add it to the section as well to keep it maintained by the appropriate
>>> maintainers.
>>>
>>> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
>>
>> Acked-by: SeongJae Park <sj@kernel.org>
>
> Thanks!
>
>>> ---
>>> MAINTAINERS | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index 46126ce2f968..dedb9525c2bc 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
>>> F: include/linux/mmu_notifier.h
>>> F: include/linux/pagewalk.h
>>> F: include/linux/pgtable.h
>>> +F: include/linux/pgalloc.h
>>
>> Nit. Should we alphabetically sort?
>
> TBH I have no idea.
>
> I thought only subsystem names should be alphabetically sorted?
I think we usually try to sort alphabetically here.
--
Cheers
David / dhildenb
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
@ 2025-10-20 13:39 ` David Hildenbrand
2025-10-20 14:12 ` Lorenzo Stoakes
2025-10-20 14:44 ` Mike Rapoport
2 siblings, 0 replies; 16+ messages in thread
From: David Hildenbrand @ 2025-10-20 13:39 UTC (permalink / raw)
To: Harry Yoo, Andrew Morton, Lorenzo Stoakes, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko
Cc: linux-mm
On 19.10.25 09:25, Harry Yoo wrote:
> For now, including <asm/pgalloc.h> instead of <linux/pgalloc.h>
> is technically fine unless the .c file calls p*d_populate_kernel()
> helper functions.
>
> But it is a better practice to always include <linux/pgalloc.h>.
> Include <linux/pgalloc.h> instead of <asm/pgalloc.h> outside arch/.
>
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
> ---
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers
David / dhildenb
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-20 13:38 ` David Hildenbrand
@ 2025-10-20 13:51 ` Harry Yoo
2025-10-20 14:07 ` David Hildenbrand
0 siblings, 1 reply; 16+ messages in thread
From: Harry Yoo @ 2025-10-20 13:51 UTC (permalink / raw)
To: David Hildenbrand
Cc: SeongJae Park, Andrew Morton, Lorenzo Stoakes, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm
On Mon, Oct 20, 2025 at 03:38:50PM +0200, David Hildenbrand wrote:
> On 20.10.25 09:43, Harry Yoo wrote:
> > On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
> > > On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
> > >
> > > > Since include/linux/pgtable.h is already listed in the MM CORE section,
> > > > add it to the section as well to keep it maintained by the appropriate
> > > > maintainers.
> > > >
> > > > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
> > >
> > > Acked-by: SeongJae Park <sj@kernel.org>
> >
> > Thanks!
> >
> > > > ---
> > > > MAINTAINERS | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > index 46126ce2f968..dedb9525c2bc 100644
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> > > > F: include/linux/mmu_notifier.h
> > > > F: include/linux/pagewalk.h
> > > > F: include/linux/pgtable.h
> > > > +F: include/linux/pgalloc.h
> > >
> > > Nit. Should we alphabetically sort?
> >
> > TBH I have no idea.
> >
> > I thought only subsystem names should be alphabetically sorted?
>
> I think we usually try to sort alphabetically here.
Thank you SJ and David, I'll sort it and resend in few days
(unless Andrew prefers to adjust it)
> --
> Cheers
>
> David / dhildenb
>
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-20 7:43 ` Harry Yoo
2025-10-20 13:38 ` David Hildenbrand
@ 2025-10-20 14:05 ` Lorenzo Stoakes
2025-10-20 14:10 ` Harry Yoo
1 sibling, 1 reply; 16+ messages in thread
From: Lorenzo Stoakes @ 2025-10-20 14:05 UTC (permalink / raw)
To: Harry Yoo
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm
On Mon, Oct 20, 2025 at 04:43:33PM +0900, Harry Yoo wrote:
> On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
> > On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
> >
> > > Since include/linux/pgtable.h is already listed in the MM CORE section,
> > > add it to the section as well to keep it maintained by the appropriate
> > > maintainers.
> > >
> > > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Thanks for adding, but please put before pgtable.h to fix the checkpatch
warning.
With that done:
Acked-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> >
> > Acked-by: SeongJae Park <sj@kernel.org>
>
> Thanks!
>
> > > ---
> > > MAINTAINERS | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index 46126ce2f968..dedb9525c2bc 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> > > F: include/linux/mmu_notifier.h
> > > F: include/linux/pagewalk.h
> > > F: include/linux/pgtable.h
> > > +F: include/linux/pgalloc.h
> >
> > Nit. Should we alphabetically sort?
>
> TBH I have no idea.
>
> I thought only subsystem names should be alphabetically sorted?
No it's files too, checkpatch will tell you:
● checkpatch.pl: 262: WARNING: Misordered MAINTAINERS entry - list file patterns in alphabetic order
>
> > Thanks,
> > SJ
> >
> > [...]
>
> --
> Cheers,
> Harry / Hyeonggon
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-20 13:51 ` Harry Yoo
@ 2025-10-20 14:07 ` David Hildenbrand
0 siblings, 0 replies; 16+ messages in thread
From: David Hildenbrand @ 2025-10-20 14:07 UTC (permalink / raw)
To: Harry Yoo
Cc: SeongJae Park, Andrew Morton, Lorenzo Stoakes, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm
On 20.10.25 15:51, Harry Yoo wrote:
> On Mon, Oct 20, 2025 at 03:38:50PM +0200, David Hildenbrand wrote:
>> On 20.10.25 09:43, Harry Yoo wrote:
>>> On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
>>>> On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
>>>>
>>>>> Since include/linux/pgtable.h is already listed in the MM CORE section,
>>>>> add it to the section as well to keep it maintained by the appropriate
>>>>> maintainers.
>>>>>
>>>>> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
>>>>
>>>> Acked-by: SeongJae Park <sj@kernel.org>
>>>
>>> Thanks!
>>>
>>>>> ---
>>>>> MAINTAINERS | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>>> index 46126ce2f968..dedb9525c2bc 100644
>>>>> --- a/MAINTAINERS
>>>>> +++ b/MAINTAINERS
>>>>> @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
>>>>> F: include/linux/mmu_notifier.h
>>>>> F: include/linux/pagewalk.h
>>>>> F: include/linux/pgtable.h
>>>>> +F: include/linux/pgalloc.h
>>>>
>>>> Nit. Should we alphabetically sort?
>>>
>>> TBH I have no idea.
>>>
>>> I thought only subsystem names should be alphabetically sorted?
>>
>> I think we usually try to sort alphabetically here.
>
> Thank you SJ and David, I'll sort it and resend in few days
> (unless Andrew prefers to adjust it)
Feel free to add my
Acked-by: David Hildenbrand <david@redhat.com>
Then!
--
Cheers
David / dhildenb
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-20 14:05 ` Lorenzo Stoakes
@ 2025-10-20 14:10 ` Harry Yoo
0 siblings, 0 replies; 16+ messages in thread
From: Harry Yoo @ 2025-10-20 14:10 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm
On Mon, Oct 20, 2025 at 03:05:52PM +0100, Lorenzo Stoakes wrote:
> On Mon, Oct 20, 2025 at 04:43:33PM +0900, Harry Yoo wrote:
> > On Sun, Oct 19, 2025 at 03:07:36PM -0700, SeongJae Park wrote:
> > > On Sun, 19 Oct 2025 16:25:08 +0900 Harry Yoo <harry.yoo@oracle.com> wrote:
> > >
> > > > Since include/linux/pgtable.h is already listed in the MM CORE section,
> > > > add it to the section as well to keep it maintained by the appropriate
> > > > maintainers.
> > > >
> > > > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
>
> Thanks for adding, but please put before pgtable.h to fix the checkpatch
> warning.
>
> With that done:
>
> Acked-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> > >
> > > Acked-by: SeongJae Park <sj@kernel.org>
> >
> > Thanks!
> >
> > > > ---
> > > > MAINTAINERS | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > index 46126ce2f968..dedb9525c2bc 100644
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> > > > F: include/linux/mmu_notifier.h
> > > > F: include/linux/pagewalk.h
> > > > F: include/linux/pgtable.h
> > > > +F: include/linux/pgalloc.h
> > >
> > > Nit. Should we alphabetically sort?
> >
> > TBH I have no idea.
> >
> > I thought only subsystem names should be alphabetically sorted?
>
> No it's files too, checkpatch will tell you:
>
> ● checkpatch.pl: 262: WARNING: Misordered MAINTAINERS entry - list file patterns in alphabetic order
*blaming myself for not running checkpatch*
Thanks, will fix it!
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
2025-10-20 13:39 ` David Hildenbrand
@ 2025-10-20 14:12 ` Lorenzo Stoakes
2025-10-20 14:44 ` Mike Rapoport
2 siblings, 0 replies; 16+ messages in thread
From: Lorenzo Stoakes @ 2025-10-20 14:12 UTC (permalink / raw)
To: Harry Yoo
Cc: Andrew Morton, David Hildenbrand, Liam R . Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm
On Sun, Oct 19, 2025 at 04:25:09PM +0900, Harry Yoo wrote:
> For now, including <asm/pgalloc.h> instead of <linux/pgalloc.h>
> is technically fine unless the .c file calls p*d_populate_kernel()
> helper functions.
>
> But it is a better practice to always include <linux/pgalloc.h>.
> Include <linux/pgalloc.h> instead of <asm/pgalloc.h> outside arch/.
>
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Thanks for this, LGTM so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> drivers/firmware/efi/arm-runtime.c | 2 +-
> drivers/firmware/efi/riscv-runtime.c | 2 +-
> drivers/s390/char/sclp_sd.c | 3 +--
> fs/dax.c | 2 +-
> kernel/fork.c | 2 +-
> mm/debug_vm_pgtable.c | 2 +-
> mm/filemap.c | 2 +-
> mm/huge_memory.c | 2 +-
> mm/hugetlb.c | 2 +-
> mm/hugetlb_vmemmap.c | 2 +-
> mm/khugepaged.c | 2 +-
> mm/memory.c | 2 +-
> mm/mmu_gather.c | 2 +-
> mm/mremap.c | 2 +-
> mm/pgtable-generic.c | 2 +-
> mm/pt_reclaim.c | 2 +-
> 16 files changed, 16 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
> index 83092d93f36a..2e3b5131df32 100644
> --- a/drivers/firmware/efi/arm-runtime.c
> +++ b/drivers/firmware/efi/arm-runtime.c
> @@ -19,11 +19,11 @@
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> #include <linux/pgtable.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/cacheflush.h>
> #include <asm/efi.h>
> #include <asm/mmu.h>
> -#include <asm/pgalloc.h>
>
> #if defined(CONFIG_PTDUMP_DEBUGFS) || defined(CONFIG_ARM_PTDUMP_DEBUGFS)
> #include <asm/ptdump.h>
> diff --git a/drivers/firmware/efi/riscv-runtime.c b/drivers/firmware/efi/riscv-runtime.c
> index fa71cd898120..5b8d72885fee 100644
> --- a/drivers/firmware/efi/riscv-runtime.c
> +++ b/drivers/firmware/efi/riscv-runtime.c
> @@ -21,11 +21,11 @@
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> #include <linux/pgtable.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/cacheflush.h>
> #include <asm/efi.h>
> #include <asm/mmu.h>
> -#include <asm/pgalloc.h>
>
> static bool __init efi_virtmap_init(void)
> {
> diff --git a/drivers/s390/char/sclp_sd.c b/drivers/s390/char/sclp_sd.c
> index 129b89fe40a3..7a791cb35aea 100644
> --- a/drivers/s390/char/sclp_sd.c
> +++ b/drivers/s390/char/sclp_sd.c
> @@ -17,8 +17,7 @@
> #include <linux/vmalloc.h>
> #include <linux/async.h>
> #include <linux/mutex.h>
> -
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
>
> #include "sclp.h"
>
> diff --git a/fs/dax.c b/fs/dax.c
> index 89f071ba7b10..1c78fc02462c 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -24,7 +24,7 @@
> #include <linux/mmu_notifier.h>
> #include <linux/iomap.h>
> #include <linux/rmap.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
>
> #define CREATE_TRACE_POINTS
> #include <trace/events/fs_dax.h>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 3da0f08615a9..9d48646e659f 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -107,7 +107,7 @@
> #include <linux/tick.h>
> #include <linux/unwind_deferred.h>
>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <linux/uaccess.h>
> #include <asm/mmu_context.h>
> #include <asm/cacheflush.h>
> diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
> index 830107b6dd08..25a823bddb92 100644
> --- a/mm/debug_vm_pgtable.c
> +++ b/mm/debug_vm_pgtable.c
> @@ -30,9 +30,9 @@
> #include <linux/sched/mm.h>
> #include <linux/io.h>
> #include <linux/vmalloc.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/cacheflush.h>
> -#include <asm/pgalloc.h>
> #include <asm/tlbflush.h>
>
> /*
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 893ba49808b7..ffcdf4f81d0a 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -48,7 +48,7 @@
> #include <linux/rcupdate_wait.h>
> #include <linux/sched/mm.h>
> #include <linux/sysctl.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <asm/tlbflush.h>
> #include "internal.h"
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index bfb52c564fb3..b4d18172cd53 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -39,9 +39,9 @@
> #include <linux/compat.h>
> #include <linux/pgalloc_tag.h>
> #include <linux/pagewalk.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/tlb.h>
> -#include <asm/pgalloc.h>
> #include "internal.h"
> #include "swap.h"
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 86e672fcb305..1ea459723cce 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -39,9 +39,9 @@
> #include <linux/memory.h>
> #include <linux/mm_inline.h>
> #include <linux/padata.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/page.h>
> -#include <asm/pgalloc.h>
> #include <asm/tlb.h>
> #include <asm/setup.h>
>
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index 96ee2bd16ee1..69d71e048e16 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -15,7 +15,7 @@
> #include <linux/bootmem_info.h>
> #include <linux/mmdebug.h>
> #include <linux/pagewalk.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <asm/tlbflush.h>
> #include "hugetlb_vmemmap.h"
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index e947b96e1443..cb2245085879 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -21,9 +21,9 @@
> #include <linux/shmem_fs.h>
> #include <linux/dax.h>
> #include <linux/ksm.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/tlb.h>
> -#include <asm/pgalloc.h>
> #include "internal.h"
> #include "mm_slot.h"
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 19615bcf234f..449d3c312fcd 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -80,7 +80,7 @@
>
> #include <asm/io.h>
> #include <asm/mmu_context.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <linux/uaccess.h>
> #include <asm/tlb.h>
> #include <asm/tlbflush.h>
> diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c
> index 374aa6f021c6..247e3f9db6c7 100644
> --- a/mm/mmu_gather.c
> +++ b/mm/mmu_gather.c
> @@ -9,8 +9,8 @@
> #include <linux/smp.h>
> #include <linux/swap.h>
> #include <linux/rmap.h>
> +#include <linux/pgalloc.h>
>
> -#include <asm/pgalloc.h>
> #include <asm/tlb.h>
>
> #ifndef CONFIG_MMU_GATHER_NO_GATHER
> diff --git a/mm/mremap.c b/mm/mremap.c
> index bd7314898ec5..a7f531c17b79 100644
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -25,10 +25,10 @@
> #include <linux/uaccess.h>
> #include <linux/userfaultfd_k.h>
> #include <linux/mempolicy.h>
> +#include <linux/pgalloc.h>
>
> #include <asm/cacheflush.h>
> #include <asm/tlb.h>
> -#include <asm/pgalloc.h>
>
> #include "internal.h"
>
> diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
> index 0c847cdf4fd3..7b50efe9c477 100644
> --- a/mm/pgtable-generic.c
> +++ b/mm/pgtable-generic.c
> @@ -13,7 +13,7 @@
> #include <linux/swap.h>
> #include <linux/swapops.h>
> #include <linux/mm_inline.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <asm/tlb.h>
>
> /*
> diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
> index 7e9455a18aae..ec6fe4eb2644 100644
> --- a/mm/pt_reclaim.c
> +++ b/mm/pt_reclaim.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <linux/hugetlb.h>
> #include <asm-generic/tlb.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
>
> #include "internal.h"
>
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section
2025-10-19 7:25 ` [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section Harry Yoo
2025-10-19 22:07 ` SeongJae Park
@ 2025-10-20 14:34 ` Mike Rapoport
1 sibling, 0 replies; 16+ messages in thread
From: Mike Rapoport @ 2025-10-20 14:34 UTC (permalink / raw)
To: Harry Yoo
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm
On Sun, Oct 19, 2025 at 04:25:08PM +0900, Harry Yoo wrote:
> Since include/linux/pgtable.h is already listed in the MM CORE section,
> add it to the section as well to keep it maintained by the appropriate
> maintainers.
>
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
with the alphabetical sorting others mentioned :)
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 46126ce2f968..dedb9525c2bc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16249,6 +16249,7 @@ F: include/linux/mmdebug.h
> F: include/linux/mmu_notifier.h
> F: include/linux/pagewalk.h
> F: include/linux/pgtable.h
> +F: include/linux/pgalloc.h
> F: include/linux/ptdump.h
> F: include/linux/vmpressure.h
> F: include/linux/vmstat.h
> --
> 2.43.0
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
2025-10-20 13:39 ` David Hildenbrand
2025-10-20 14:12 ` Lorenzo Stoakes
@ 2025-10-20 14:44 ` Mike Rapoport
2025-10-21 5:09 ` Harry Yoo
2 siblings, 1 reply; 16+ messages in thread
From: Mike Rapoport @ 2025-10-20 14:44 UTC (permalink / raw)
To: Harry Yoo
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm
On Sun, Oct 19, 2025 at 04:25:09PM +0900, Harry Yoo wrote:
> For now, including <asm/pgalloc.h> instead of <linux/pgalloc.h>
> is technically fine unless the .c file calls p*d_populate_kernel()
> helper functions.
>
> But it is a better practice to always include <linux/pgalloc.h>.
> Include <linux/pgalloc.h> instead of <asm/pgalloc.h> outside arch/.
>
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
> ---
> drivers/firmware/efi/arm-runtime.c | 2 +-
> drivers/firmware/efi/riscv-runtime.c | 2 +-
> drivers/s390/char/sclp_sd.c | 3 +--
> fs/dax.c | 2 +-
> kernel/fork.c | 2 +-
> mm/debug_vm_pgtable.c | 2 +-
> mm/filemap.c | 2 +-
> mm/huge_memory.c | 2 +-
> mm/hugetlb.c | 2 +-
> mm/hugetlb_vmemmap.c | 2 +-
> mm/khugepaged.c | 2 +-
> mm/memory.c | 2 +-
> mm/mmu_gather.c | 2 +-
> mm/mremap.c | 2 +-
> mm/pgtable-generic.c | 2 +-
> mm/pt_reclaim.c | 2 +-
> 16 files changed, 16 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
> index 83092d93f36a..2e3b5131df32 100644
> --- a/drivers/firmware/efi/arm-runtime.c
> +++ b/drivers/firmware/efi/arm-runtime.c
> @@ -19,11 +19,11 @@
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> #include <linux/pgtable.h>
> +#include <linux/pgalloc.h>
Looks like here the includes are sorted alphabetically, please keep it.
> #include <asm/cacheflush.h>
> #include <asm/efi.h>
> #include <asm/mmu.h>
> -#include <asm/pgalloc.h>
>
> #if defined(CONFIG_PTDUMP_DEBUGFS) || defined(CONFIG_ARM_PTDUMP_DEBUGFS)
> #include <asm/ptdump.h>
> diff --git a/drivers/firmware/efi/riscv-runtime.c b/drivers/firmware/efi/riscv-runtime.c
> index fa71cd898120..5b8d72885fee 100644
> --- a/drivers/firmware/efi/riscv-runtime.c
> +++ b/drivers/firmware/efi/riscv-runtime.c
> @@ -21,11 +21,11 @@
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> #include <linux/pgtable.h>
> +#include <linux/pgalloc.h>
And here as well.
> #include <asm/cacheflush.h>
> #include <asm/efi.h>
> #include <asm/mmu.h>
> -#include <asm/pgalloc.h>
...
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 3da0f08615a9..9d48646e659f 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -107,7 +107,7 @@
> #include <linux/tick.h>
> #include <linux/unwind_deferred.h>
>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
> #include <linux/uaccess.h>
I'd kill an empty line before include <linux/pgalloc.h> and add one here to
separate include <asm/.
> #include <asm/mmu_context.h>
> #include <asm/cacheflush.h>
...
> diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
> index 7e9455a18aae..ec6fe4eb2644 100644
> --- a/mm/pt_reclaim.c
> +++ b/mm/pt_reclaim.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <linux/hugetlb.h>
> #include <asm-generic/tlb.h>
> -#include <asm/pgalloc.h>
> +#include <linux/pgalloc.h>
Please move it before include <asm-generic/tlb.h>
> #include "internal.h"
With those fixed
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-20 14:44 ` Mike Rapoport
@ 2025-10-21 5:09 ` Harry Yoo
2025-10-21 6:07 ` Mike Rapoport
0 siblings, 1 reply; 16+ messages in thread
From: Harry Yoo @ 2025-10-21 5:09 UTC (permalink / raw)
To: Mike Rapoport
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm
On Mon, Oct 20, 2025 at 05:44:08PM +0300, Mike Rapoport wrote:
> On Sun, Oct 19, 2025 at 04:25:09PM +0900, Harry Yoo wrote:
> > For now, including <asm/pgalloc.h> instead of <linux/pgalloc.h>
> > is technically fine unless the .c file calls p*d_populate_kernel()
> > helper functions.
> >
> > But it is a better practice to always include <linux/pgalloc.h>.
> > Include <linux/pgalloc.h> instead of <asm/pgalloc.h> outside arch/.
> >
> > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
> > ---
> > drivers/firmware/efi/arm-runtime.c | 2 +-
> > drivers/firmware/efi/riscv-runtime.c | 2 +-
> > drivers/s390/char/sclp_sd.c | 3 +--
> > fs/dax.c | 2 +-
> > kernel/fork.c | 2 +-
> > mm/debug_vm_pgtable.c | 2 +-
> > mm/filemap.c | 2 +-
> > mm/huge_memory.c | 2 +-
> > mm/hugetlb.c | 2 +-
> > mm/hugetlb_vmemmap.c | 2 +-
> > mm/khugepaged.c | 2 +-
> > mm/memory.c | 2 +-
> > mm/mmu_gather.c | 2 +-
> > mm/mremap.c | 2 +-
> > mm/pgtable-generic.c | 2 +-
> > mm/pt_reclaim.c | 2 +-
> > 16 files changed, 16 insertions(+), 17 deletions(-)
Hi Mike, thanks for review.
I wasn't really sure if there are certain rules for header inclusion
(yeah, they are not very consistent across different files...) but now that
you mention it I can see them, thanks!
> > diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
> > index 83092d93f36a..2e3b5131df32 100644
> > --- a/drivers/firmware/efi/arm-runtime.c
> > +++ b/drivers/firmware/efi/arm-runtime.c
> > @@ -19,11 +19,11 @@
> > #include <linux/slab.h>
> > #include <linux/spinlock.h>
> > #include <linux/pgtable.h>
> > +#include <linux/pgalloc.h>
>
> Looks like here the includes are sorted alphabetically, please keep it.
Will do.
> > #include <asm/cacheflush.h>
> > #include <asm/efi.h>
> > #include <asm/mmu.h>
> > -#include <asm/pgalloc.h>
> >
> > #if defined(CONFIG_PTDUMP_DEBUGFS) || defined(CONFIG_ARM_PTDUMP_DEBUGFS)
> > #include <asm/ptdump.h>
> > diff --git a/drivers/firmware/efi/riscv-runtime.c b/drivers/firmware/efi/riscv-runtime.c
> > index fa71cd898120..5b8d72885fee 100644
> > --- a/drivers/firmware/efi/riscv-runtime.c
> > +++ b/drivers/firmware/efi/riscv-runtime.c
> > @@ -21,11 +21,11 @@
> > #include <linux/slab.h>
> > #include <linux/spinlock.h>
> > #include <linux/pgtable.h>
> > +#include <linux/pgalloc.h>
>
> And here as well.
Will do.
> > #include <asm/cacheflush.h>
> > #include <asm/efi.h>
> > #include <asm/mmu.h>
> > -#include <asm/pgalloc.h>
>
> ...
>
> > diff --git a/kernel/fork.c b/kernel/fork.c
> > index 3da0f08615a9..9d48646e659f 100644
> > --- a/kernel/fork.c
> > +++ b/kernel/fork.c
> > @@ -107,7 +107,7 @@
> > #include <linux/tick.h>
> > #include <linux/unwind_deferred.h>
> >
> > -#include <asm/pgalloc.h>
> > +#include <linux/pgalloc.h>
> > #include <linux/uaccess.h>
>
> I'd kill an empty line before include <linux/pgalloc.h> and add one here to
> separate include <asm/.
That looks good and will do.
> > #include <asm/mmu_context.h>
> > #include <asm/cacheflush.h>
>
> ...
>
> > diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
> > index 7e9455a18aae..ec6fe4eb2644 100644
> > --- a/mm/pt_reclaim.c
> > +++ b/mm/pt_reclaim.c
> > @@ -1,7 +1,7 @@
> > // SPDX-License-Identifier: GPL-2.0
> > #include <linux/hugetlb.h>
> > #include <asm-generic/tlb.h>
> > -#include <asm/pgalloc.h>
> > +#include <linux/pgalloc.h>
>
> Please move it before include <asm-generic/tlb.h>
Will do, and in this case no empty line between #include <asm*/*.h> and
#include <linux/*.h>, right?
> > #include "internal.h"
>
> With those fixed
>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Thanks a lot!
> --
> Sincerely yours,
> Mike.
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h
2025-10-21 5:09 ` Harry Yoo
@ 2025-10-21 6:07 ` Mike Rapoport
0 siblings, 0 replies; 16+ messages in thread
From: Mike Rapoport @ 2025-10-21 6:07 UTC (permalink / raw)
To: Harry Yoo
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R . Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm
On Tue, Oct 21, 2025 at 02:09:43PM +0900, Harry Yoo wrote:
> On Mon, Oct 20, 2025 at 05:44:08PM +0300, Mike Rapoport wrote:
> > > diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
> > > index 7e9455a18aae..ec6fe4eb2644 100644
> > > --- a/mm/pt_reclaim.c
> > > +++ b/mm/pt_reclaim.c
> > > @@ -1,7 +1,7 @@
> > > // SPDX-License-Identifier: GPL-2.0
> > > #include <linux/hugetlb.h>
> > > #include <asm-generic/tlb.h>
> > > -#include <asm/pgalloc.h>
> > > +#include <linux/pgalloc.h>
> >
> > Please move it before include <asm-generic/tlb.h>
>
> Will do, and in this case no empty line between #include <asm*/*.h> and
> #include <linux/*.h>, right?
Won't hurt :)
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-10-21 6:08 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-19 7:25 [PATCH V1 0/2] mm: MISC follow-up patches for linux/pgalloc.h Harry Yoo
2025-10-19 7:25 ` [PATCH V1 1/2] MAINTAINERS: add include/linux/pgalloc.h to MM CORE section Harry Yoo
2025-10-19 22:07 ` SeongJae Park
2025-10-20 7:43 ` Harry Yoo
2025-10-20 13:38 ` David Hildenbrand
2025-10-20 13:51 ` Harry Yoo
2025-10-20 14:07 ` David Hildenbrand
2025-10-20 14:05 ` Lorenzo Stoakes
2025-10-20 14:10 ` Harry Yoo
2025-10-20 14:34 ` Mike Rapoport
2025-10-19 7:25 ` [PATCH V1 2/2] treewide: include linux/pgalloc.h instead of asm/pgalloc.h Harry Yoo
2025-10-20 13:39 ` David Hildenbrand
2025-10-20 14:12 ` Lorenzo Stoakes
2025-10-20 14:44 ` Mike Rapoport
2025-10-21 5:09 ` Harry Yoo
2025-10-21 6:07 ` Mike Rapoport
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).