From: Ryan Roberts <ryan.roberts@arm.com>
To: Ard Biesheuvel <ardb+git@google.com>,
linux-arm-kernel@lists.infradead.org
Cc: catalin.marinas@arm.com, will@kernel.org,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH 1/2] arm64/mm: Use generic __pud_free() helper in pud_free() implementation
Date: Fri, 1 Mar 2024 10:46:55 +0000 [thread overview]
Message-ID: <af70cf8f-dcef-4f1b-b632-ffb7f190c8ab@arm.com> (raw)
In-Reply-To: <20240301104046.1234309-5-ardb+git@google.com>
On 01/03/2024 10:40, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> Commit 0dd4f60a2c76 ("arm64: mm: Add support for folding PUDs at
> runtime") implements specialized PUD alloc/free helpers to allow the
> decision whether or not to fold PUDs to be made at runtime when the
> number of paging levels is 4 or higher.
>
> Its implementation of pud_free() is based on the generic version that
> existed when the patch was first written, but in the meantime, the
> freeing of a PUD has become a bit more involved, and so instead of
> simply freeing the page, we should invoke the generic __pud_free() that
> encapsulates whatever needs doing at this point.
>
> This fixes a reported warning emitted by the page flags
> self-diagnostics.
>
> Reported-by: Ryan Roberts <ryan.roberts@arm.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> arch/arm64/include/asm/pgalloc.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h
> index aeba2cf15a25..8ff5f2a2579e 100644
> --- a/arch/arm64/include/asm/pgalloc.h
> +++ b/arch/arm64/include/asm/pgalloc.h
> @@ -60,8 +60,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
> {
> if (!pgtable_l4_enabled())
> return;
> - BUG_ON((unsigned long)pud & (PAGE_SIZE-1));
> - free_page((unsigned long)pud);
> + __pud_free(mm, pud);
> }
> #else
> static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-03-01 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 10:40 [PATCH 0/2] arm64 lpa2 fixes Ard Biesheuvel
2024-03-01 10:40 ` [PATCH 1/2] arm64/mm: Use generic __pud_free() helper in pud_free() implementation Ard Biesheuvel
2024-03-01 10:46 ` Ryan Roberts [this message]
2024-03-01 10:40 ` [PATCH 2/2] arm64/mm: Avoid ID mapping of kpti flag if it is no longer needed Ard Biesheuvel
2024-03-01 18:29 ` [PATCH 0/2] arm64 lpa2 fixes Catalin Marinas
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=af70cf8f-dcef-4f1b-b632-ffb7f190c8ab@arm.com \
--to=ryan.roberts@arm.com \
--cc=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).