From: Ryan Roberts <ryan.roberts@arm.com>
To: Yeoreum Yun <yeoreum.yun@arm.com>,
catalin.marinas@arm.com, will@kernel.org,
akpm@linux-foundation.org, david@kernel.org,
kevin.brodsky@arm.com, quic_zhenhuah@quicinc.com,
dev.jain@arm.com, yang@os.amperecomputing.com,
chaitanyas.prakash@arm.com, bigeasy@linutronix.de,
clrkwllms@kernel.org, rostedt@goodmis.org,
lorenzo.stoakes@oracle.com, ardb@kernel.org, jackmanb@google.com,
vbabka@suse.cz, mhocko@suse.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v4 1/3] arm64: mmu: introduce pgtable_alloc_t
Date: Fri, 2 Jan 2026 15:28:49 +0000 [thread overview]
Message-ID: <4a315d79-bf82-4a90-9c9c-8dd1bdc43d38@arm.com> (raw)
In-Reply-To: <20260102150736.1378818-2-yeoreum.yun@arm.com>
On 02/01/2026 15:07, Yeoreum Yun wrote:
> This is preparation patch to use preallocated page tables
> for linear_map_split_to_ptes().
>
> Define pgtable_alloc_t type for callback used by create_XXX_mapping().
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> arch/arm64/mm/mmu.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 8e1d80a7033e..4b4908ae189b 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -74,6 +74,8 @@ EXPORT_SYMBOL(empty_zero_page);
> static DEFINE_SPINLOCK(swapper_pgdir_lock);
> static DEFINE_MUTEX(fixmap_lock);
>
> +typedef phys_addr_t (pgtable_alloc_t)(enum pgtable_type);
> +
> void noinstr set_swapper_pgd(pgd_t *pgdp, pgd_t pgd)
> {
> pgd_t *fixmap_pgdp;
> @@ -197,7 +199,7 @@ static void init_pte(pte_t *ptep, unsigned long addr, unsigned long end,
> static int alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
> unsigned long end, phys_addr_t phys,
> pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> unsigned long next;
> @@ -252,7 +254,7 @@ static int alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
>
> static int init_pmd(pmd_t *pmdp, unsigned long addr, unsigned long end,
> phys_addr_t phys, pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type), int flags)
> + pgtable_alloc_t pgtable_alloc, int flags)
> {
> unsigned long next;
>
> @@ -292,7 +294,7 @@ static int init_pmd(pmd_t *pmdp, unsigned long addr, unsigned long end,
> static int alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
> unsigned long end, phys_addr_t phys,
> pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret;
> @@ -349,7 +351,7 @@ static int alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
>
> static int alloc_init_pud(p4d_t *p4dp, unsigned long addr, unsigned long end,
> phys_addr_t phys, pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret = 0;
> @@ -415,7 +417,7 @@ static int alloc_init_pud(p4d_t *p4dp, unsigned long addr, unsigned long end,
>
> static int alloc_init_p4d(pgd_t *pgdp, unsigned long addr, unsigned long end,
> phys_addr_t phys, pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret;
> @@ -467,7 +469,7 @@ static int alloc_init_p4d(pgd_t *pgdp, unsigned long addr, unsigned long end,
> static int __create_pgd_mapping_locked(pgd_t *pgdir, phys_addr_t phys,
> unsigned long virt, phys_addr_t size,
> pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret;
> @@ -500,7 +502,7 @@ static int __create_pgd_mapping_locked(pgd_t *pgdir, phys_addr_t phys,
> static int __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
> unsigned long virt, phys_addr_t size,
> pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret;
> @@ -516,7 +518,7 @@ static int __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
> static void early_create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
> unsigned long virt, phys_addr_t size,
> pgprot_t prot,
> - phys_addr_t (*pgtable_alloc)(enum pgtable_type),
> + pgtable_alloc_t pgtable_alloc,
> int flags)
> {
> int ret;
next prev parent reply other threads:[~2026-01-02 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 15:07 [PATCH v4 0/3] fix wrong usage of memory allocation APIs under PREEMPT_RT in arm64 Yeoreum Yun
2026-01-02 15:07 ` [PATCH v4 1/3] arm64: mmu: introduce pgtable_alloc_t Yeoreum Yun
2026-01-02 15:28 ` Ryan Roberts [this message]
2026-01-02 16:16 ` Yeoreum Yun
2026-01-02 15:07 ` [PATCH v4 2/3] arm64: mmu: avoid allocating pages while splitting the linear mapping Yeoreum Yun
2026-01-02 15:44 ` Ryan Roberts
2026-01-02 16:14 ` Yeoreum Yun
2026-01-02 17:04 ` Ryan Roberts
2026-01-02 15:07 ` [PATCH v4 3/3] arm64: mmu: avoid allocating pages while installing ng-mapping for KPTI Yeoreum Yun
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=4a315d79-bf82-4a90-9c9c-8dd1bdc43d38@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=catalin.marinas@arm.com \
--cc=chaitanyas.prakash@arm.com \
--cc=clrkwllms@kernel.org \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=jackmanb@google.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=quic_zhenhuah@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.com \
--cc=yeoreum.yun@arm.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
all inboxes | Powered by JetHome®