From: Will Deacon <will@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel@vger.kernel.org, ryan.roberts@arm.com
Subject: Re: [PATCH] arm64/mm: Drop redundant extern declaration for rodata_full
Date: Tue, 4 Nov 2025 15:43:04 +0000 [thread overview]
Message-ID: <aQofCMqxiqujZP-g@willie-the-truck> (raw)
In-Reply-To: <20251015023609.427911-1-anshuman.khandual@arm.com>
On Wed, Oct 15, 2025 at 03:36:09AM +0100, Anshuman Khandual wrote:
> Drop the redundant extern declaration 'rodata_full' which can be included
> via the header <asm/setup.h> after moving exiting declaration outside the
> function arch_parse_debug_rodata(). While here also drop 'rodata_enabled'
> which is anyways available via the generic header <linux/init.h>.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> arch/arm64/include/asm/mmu_context.h | 2 --
> arch/arm64/include/asm/setup.h | 4 +---
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
> index 0375ca3162ff..e4b3563e1d96 100644
> --- a/arch/arm64/include/asm/mmu_context.h
> +++ b/arch/arm64/include/asm/mmu_context.h
> @@ -26,8 +26,6 @@
> #include <asm/sysreg.h>
> #include <asm/tlbflush.h>
>
> -extern bool rodata_full;
> -
> static inline void contextidr_thread_switch(struct task_struct *next)
> {
> if (!IS_ENABLED(CONFIG_PID_IN_CONTEXTIDR))
> diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h
> index 3d96dde4d214..902f1aab520f 100644
> --- a/arch/arm64/include/asm/setup.h
> +++ b/arch/arm64/include/asm/setup.h
> @@ -12,12 +12,10 @@
> */
> extern phys_addr_t __fdt_pointer __initdata;
> extern u64 __cacheline_aligned boot_args[4];
> +extern bool rodata_full;
>
> static inline bool arch_parse_debug_rodata(char *arg)
> {
> - extern bool rodata_enabled;
> - extern bool rodata_full;
> -
> if (!arg)
> return false;
It would probably be cleaner to make 'rodata_full' static in mm/pageattr.c,
move the guts of arch_parse_debug_rodata in there and then consolidate
can_set_direct_map() and force_pte_mapping().
You need to talk to Ryan for the last part, as David's made some
suggestions around that too.
Will
next prev parent reply other threads:[~2025-11-04 15:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 2:36 [PATCH] arm64/mm: Drop redundant extern declaration for rodata_full Anshuman Khandual
2025-11-04 15:43 ` Will Deacon [this message]
2025-11-05 5:30 ` Anshuman Khandual
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=aQofCMqxiqujZP-g@willie-the-truck \
--to=will@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan.roberts@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