From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Joel Stanley <joel@jms.id.au>, Paul Mackerras <paulus@samba.org>,
Michael Neuling <mikey@neuling.org>,
Anton Blanchard <anton@ozlabs.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH 1/3] powerpc/64s: Fix build when !PPC_BARRIER_NOSPEC
Date: Mon, 16 Aug 2021 10:31:23 +0200 [thread overview]
Message-ID: <71820896-9c74-bc68-79c5-cc6d6d63fb65@csgroup.eu> (raw)
In-Reply-To: <20210816082403.2293846-2-joel@jms.id.au>
Le 16/08/2021 à 10:24, Joel Stanley a écrit :
> When disabling PPC_BARRIER_NOSPEC the do_barrier_nospec_fixups_range
> definition is still included, as well as a stub in asm/setup.h:
>
> ../arch/powerpc/lib/feature-fixups.c:502:6: error: redefinition of ‘do_barrier_nospec_fixu>
> 502 | void do_barrier_nospec_fixups_range(bool enable, void *fixup_start, void *fixup_en>
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../arch/powerpc/lib/feature-fixups.c:23:
> ../arch/powerpc/include/asm/setup.h:70:20: note: previous definition of ‘do_barrier_nospec>
> 70 | static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *>
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> I assume the intent was to put the just do_barrier_nospec_fixups
> behind PPC_BARRIER_NOSPEC and let the compiler drop _range when there
> are no users. (There is a caller in module.c, but this is behind
> PPC_BARRIER_NOSPEC).
The compiler won't drop do_barrier_nospec_fixups_range() because it is not static.
>
> This makes PPC_BOOK3S_64 match how the PPC_FSL_BOOK3E build works.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> arch/powerpc/include/asm/setup.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
> index 6c1a7d217d1a..71012284c044 100644
> --- a/arch/powerpc/include/asm/setup.h
> +++ b/arch/powerpc/include/asm/setup.h
> @@ -66,8 +66,6 @@ extern bool barrier_nospec_enabled;
>
> #ifdef CONFIG_PPC_BARRIER_NOSPEC
> void do_barrier_nospec_fixups_range(bool enable, void *start, void *end);
> -#else
> -static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *end) { }
> #endif
>
> #ifdef CONFIG_PPC_FSL_BOOK3E
>
next prev parent reply other threads:[~2021-08-16 8:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 8:24 [PATCH 0/3] powerpc/64s: Fix PPC_BARRIER_NOSPEC=n Joel Stanley
2021-08-16 8:24 ` [PATCH 1/3] powerpc/64s: Fix build when !PPC_BARRIER_NOSPEC Joel Stanley
2021-08-16 8:31 ` Christophe Leroy [this message]
2021-08-16 8:24 ` [PATCH 2/3] powerpc: Fix undefined static key Joel Stanley
2021-08-16 8:39 ` Christophe Leroy
2021-08-17 2:44 ` Joel Stanley
2021-08-17 9:21 ` Christophe Leroy
2021-08-17 2:52 ` Michael Ellerman
2021-08-16 8:24 ` [PATCH 3/3] powerpc/microwatt: CPU doesn't (yet) have speculation bugs Joel Stanley
2021-08-16 8:42 ` Christophe Leroy
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=71820896-9c74-bc68-79c5-cc6d6d63fb65@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=anton@ozlabs.org \
--cc=dja@axtens.net \
--cc=joel@jms.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.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).