Skip to contentSkip to conversation

treewide-include-linux-pgalloch-instead-of-asm-pgalloch.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 17, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: treewide: include linux/pgalloc.h instead of asm/pgalloc.h
has been removed from the -mm tree. Its filename was
treewide-include-linux-pgalloch-instead-of-asm-pgalloch.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Harry Yoo <[email protected]>
Subject: treewide: include linux/pgalloc.h instead of asm/pgalloc.h
Date: Fri, 24 Oct 2025 20:30:47 +0900

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

---

 drivers/firmware/efi/arm-runtime.c   |    4 ++--
 drivers/firmware/efi/riscv-runtime.c |    4 ++--
 drivers/s390/char/sclp_sd.c          |    3 +--
 fs/dax.c                             |    2 +-
 kernel/fork.c                        |    4 ++--
 mm/debug_vm_pgtable.c                |    2 +-
 mm/filemap.c                         |    3 ++-
 mm/huge_memory.c                     |    2 +-
 mm/hugetlb.c                         |    2 +-
 mm/hugetlb_vmemmap.c                 |    3 ++-
 mm/khugepaged.c                      |    2 +-
 mm/memory.c                          |    4 ++--
 mm/mmu_gather.c                      |    2 +-
 mm/mremap.c                          |    2 +-
 mm/pgtable-generic.c                 |    3 ++-
 mm/pt_reclaim.c                      |    3 ++-
 16 files changed, 24 insertions(+), 21 deletions(-)
drivers/firmware/efi/arm-runtime.c renamed from drivers/firmware/efi/arm-runtime.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -2
@@ -12,18 +12,18 @@
 #include <linux/io.h>
 #include <linux/memblock.h>
 #include <linux/mm_types.h>
+#include <linux/pgalloc.h>
+#include <linux/pgtable.h>
 #include <linux/preempt.h>
 #include <linux/rbtree.h>
 #include <linux/rwsem.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <linux/pgtable.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>
drivers/firmware/efi/riscv-runtime.c renamed from drivers/firmware/efi/riscv-runtime.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -2
@@ -14,18 +14,18 @@
 #include <linux/io.h>
 #include <linux/memblock.h>
 #include <linux/mm_types.h>
+#include <linux/pgalloc.h>
+#include <linux/pgtable.h>
 #include <linux/preempt.h>
 #include <linux/rbtree.h>
 #include <linux/rwsem.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <linux/pgtable.h>
 
 #include <asm/cacheflush.h>
 #include <asm/efi.h>
 #include <asm/mmu.h>
-#include <asm/pgalloc.h>
 
 static bool __init efi_virtmap_init(void)
 {
drivers/s390/char/sclp_sd.c renamed from drivers/s390/char/sclp_sd.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -2
@@ -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"
 
fs/dax.c renamed from fs/dax.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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>
kernel/fork.c renamed from kernel/fork.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -2
@@ -106,9 +106,9 @@
 #include <linux/pidfs.h>
 #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>
 #include <asm/tlbflush.h>
mm/debug_vm_pgtable.c renamed from mm/debug_vm_pgtable.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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>
 
 /*
mm/filemap.c renamed from mm/filemap.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -1
@@ -48,7 +48,8 @@
 #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"
 
mm/huge_memory.c renamed from mm/huge_memory.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -37,11 +37,11 @@
 #include <linux/sched/sysctl.h>
 #include <linux/memory-tiers.h>
 #include <linux/compat.h>
+#include <linux/pgalloc.h>
 #include <linux/pgalloc_tag.h>
 #include <linux/pagewalk.h>
 
 #include <asm/tlb.h>
-#include <asm/pgalloc.h>
 #include "internal.h"
 #include "swap.h"
 
mm/hugetlb.c renamed from mm/hugetlb.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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>
 
mm/hugetlb_vmemmap.c renamed from mm/hugetlb_vmemmap.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -1
@@ -15,7 +15,8 @@
 #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"
 
mm/khugepaged.c renamed from mm/khugepaged.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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"
 
mm/memory.c renamed from mm/memory.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -2
@@ -76,13 +76,13 @@
 #include <linux/ptrace.h>
 #include <linux/vmalloc.h>
 #include <linux/sched/sysctl.h>
+#include <linux/pgalloc.h>
+#include <linux/uaccess.h>
 
 #include <trace/events/kmem.h>
 
 #include <asm/io.h>
 #include <asm/mmu_context.h>
-#include <asm/pgalloc.h>
-#include <linux/uaccess.h>
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
mm/mmu_gather.c renamed from mm/mmu_gather.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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
mm/mremap.c renamed from mm/mremap.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +1 -1
@@ -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"
 
mm/pgtable-generic.c renamed from mm/pgtable-generic.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -1
@@ -14,7 +14,8 @@
 #include <linux/swapops.h>
 #include <linux/mm_inline.h>
 #include <linux/iommu.h>
-#include <asm/pgalloc.h>
+#include <linux/pgalloc.h>
+
 #include <asm/tlb.h>
 
 /*
mm/pt_reclaim.c renamed from mm/pt_reclaim.c~treewide-include-linux-pgalloch-instead-of-asm-pgalloch +2 -1
@@ -1,7 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/hugetlb.h>
+#include <linux/pgalloc.h>
+
 #include <asm-generic/tlb.h>
-#include <asm/pgalloc.h>
 
 #include "internal.h"
 

_

Patches currently in -mm which might be from [email protected] are