aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse-vmemmap.c
diff options
context:
space:
mode:
authorBibo Mao <[email protected]>2024-11-04 07:07:12 +0000
committerAndrew Morton <[email protected]>2024-11-12 01:22:27 +0000
commit7269ed4af344184ab9bdf318fe8864cf64849735 (patch)
tree20f5d3a6f9a7992ca96e9464053cae616291b18b /mm/sparse-vmemmap.c
parentkmemleak: iommu/iova: fix transient kmemleak false positive (diff)
downloadkernel-7269ed4af344184ab9bdf318fe8864cf64849735.tar.gz
kernel-7269ed4af344184ab9bdf318fe8864cf64849735.zip
mm: define general function pXd_init()
pud_init(), pmd_init() and kernel_pte_init() are duplicated defined in file kasan.c and sparse-vmemmap.c as weak functions. Move them to generic header file pgtable.h, architecture can redefine them. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Bibo Mao <[email protected]> Reviewed-by: Huacai Chen <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: WANG Xuerui <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/sparse-vmemmap.c')
-rw-r--r--mm/sparse-vmemmap.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index c0388b2e959d..cec67c5f37d8 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -184,10 +184,6 @@ static void * __meminit vmemmap_alloc_block_zero(unsigned long size, int node)
return p;
}
-void __weak __meminit kernel_pte_init(void *addr)
-{
-}
-
pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node)
{
pmd_t *pmd = pmd_offset(pud, addr);
@@ -201,10 +197,6 @@ pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node)
return pmd;
}
-void __weak __meminit pmd_init(void *addr)
-{
-}
-
pud_t * __meminit vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node)
{
pud_t *pud = pud_offset(p4d, addr);
@@ -218,10 +210,6 @@ pud_t * __meminit vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node)
return pud;
}
-void __weak __meminit pud_init(void *addr)
-{
-}
-
p4d_t * __meminit vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node)
{
p4d_t *p4d = p4d_offset(pgd, addr);