* [PATCH] xtensa: annotate dtb_start variable as static __initdata
@ 2024-09-18 3:15 Masahiro Yamada
2024-11-06 16:51 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2024-09-18 3:15 UTC (permalink / raw)
To: linux-kernel, Chris Zankel, Max Filippov; +Cc: Masahiro Yamada
The 'dtb_start' variable is only used within arch/xtensa/kernel/setup.c.
Mark it as 'static'.
It is only used by parse_tag_fdt() and init_arch(), both of which are
annotated as __init. Therefore, dtb_start can be annotated as __initdata,
so it will discarded after boot.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/xtensa/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index bdec4a773af0..3e076b64cc61 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -55,7 +55,7 @@ extern int initrd_below_start_ok;
#endif
#ifdef CONFIG_USE_OF
-void *dtb_start = __dtb_start;
+static void *dtb_start __initdata = __dtb_start;
#endif
extern unsigned long loops_per_jiffy;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xtensa: annotate dtb_start variable as static __initdata
2024-09-18 3:15 [PATCH] xtensa: annotate dtb_start variable as static __initdata Masahiro Yamada
@ 2024-11-06 16:51 ` Masahiro Yamada
2024-11-07 17:29 ` Max Filippov
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2024-11-06 16:51 UTC (permalink / raw)
To: linux-kernel, Chris Zankel, Max Filippov
On Wed, Sep 18, 2024 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> The 'dtb_start' variable is only used within arch/xtensa/kernel/setup.c.
> Mark it as 'static'.
>
> It is only used by parse_tag_fdt() and init_arch(), both of which are
> annotated as __init. Therefore, dtb_start can be annotated as __initdata,
> so it will discarded after boot.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
Ping?
>
> arch/xtensa/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
> index bdec4a773af0..3e076b64cc61 100644
> --- a/arch/xtensa/kernel/setup.c
> +++ b/arch/xtensa/kernel/setup.c
> @@ -55,7 +55,7 @@ extern int initrd_below_start_ok;
> #endif
>
> #ifdef CONFIG_USE_OF
> -void *dtb_start = __dtb_start;
> +static void *dtb_start __initdata = __dtb_start;
> #endif
>
> extern unsigned long loops_per_jiffy;
> --
> 2.43.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xtensa: annotate dtb_start variable as static __initdata
2024-11-06 16:51 ` Masahiro Yamada
@ 2024-11-07 17:29 ` Max Filippov
0 siblings, 0 replies; 3+ messages in thread
From: Max Filippov @ 2024-11-07 17:29 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kernel, Chris Zankel
On Wed, Nov 6, 2024 at 8:51 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Sep 18, 2024 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > The 'dtb_start' variable is only used within arch/xtensa/kernel/setup.c.
> > Mark it as 'static'.
> >
> > It is only used by parse_tag_fdt() and init_arch(), both of which are
> > annotated as __init. Therefore, dtb_start can be annotated as __initdata,
> > so it will discarded after boot.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
>
> Ping?
Thanks. Applied to my xtensa tree.
-- Max
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-07 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-18 3:15 [PATCH] xtensa: annotate dtb_start variable as static __initdata Masahiro Yamada
2024-11-06 16:51 ` Masahiro Yamada
2024-11-07 17:29 ` Max Filippov
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®