From: Muchun Song <songmuchun@bytedance.com>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
linuxppc-dev@lists.ozlabs.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrew Donnellan <andrew+kernel@donnellan.id.au>,
"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
Rohan McLure <rmclure@linux.ibm.com>,
Muchun Song <muchun.song@linux.dev>,
"Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
linux-kernel@vger.kernel.org,
Muchun Song <songmuchun@bytedance.com>
Subject: [PATCH] powerpc/mm: remove radix-specific vmemmap PMD overrides
Date: Thu, 6 Aug 2026 18:04:31 +0800 [thread overview]
Message-ID: <20260806100431.507837-1-songmuchun@bytedance.com> (raw)
PowerPC radix vmemmap population has private implementations of
vmemmap_set_pmd() and vmemmap_check_pmd() that duplicate the generic
helpers in mm/sparse-vmemmap.c.
Remove the radix-specific overrides so the common helpers are used
instead. Since commit 4edd70ee6a7d ("mm/sparse-vmemmap:
flush_cache_vmap() after hotplugging vmemmap"), the generic sparse
vmemmap code calls flush_cache_vmap() after vmemmap population. On
PowerPC, that provides the necessary ptesync.
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 26 ------------------------
1 file changed, 26 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index cf692b2b5f7b..08ab371e4722 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -987,31 +987,6 @@ bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
}
#endif
-int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
- unsigned long addr, unsigned long next)
-{
- int large = pmd_leaf(*pmdp);
-
- if (large)
- vmemmap_verify(pmdp_ptep(pmdp), node, addr, next);
-
- return large;
-}
-
-void __meminit vmemmap_set_pmd(pmd_t *pmdp, void *p, int node,
- unsigned long addr, unsigned long next)
-{
- pte_t entry;
- pte_t *ptep = pmdp_ptep(pmdp);
-
- VM_BUG_ON(!IS_ALIGNED(addr, PMD_SIZE));
- entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
- set_pte_at(&init_mm, addr, ptep, entry);
- asm volatile("ptesync": : :"memory");
-
- vmemmap_verify(ptep, node, addr, next);
-}
-
static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long addr,
int node,
struct vmem_altmap *altmap,
@@ -1055,7 +1030,6 @@ static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long
VM_BUG_ON(!PAGE_ALIGNED(addr));
entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
set_pte_at(&init_mm, addr, pte, entry);
- asm volatile("ptesync": : :"memory");
}
return pte;
}
base-commit: 9a4cdc958dd79fc6c3b20b51a10debec6ca09fec
--
2.54.0
reply other threads:[~2026-08-06 10:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806100431.507837-1-songmuchun@bytedance.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=andrew+kernel@donnellan.id.au \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=muchun.song@linux.dev \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=rmclure@linux.ibm.com \
--cc=vishal.moola@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox