From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: jpoimboe@redhat.com, jbaron@akamai.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] static_call: Use single copy of static_call_return0
Date: Mon, 26 Apr 2021 10:17:03 +0200 [thread overview]
Message-ID: <YIZ2/2H4W1U5DNBm@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210425211140.3157580-1-ak@linux.intel.com>
On Sun, Apr 25, 2021 at 02:11:40PM -0700, Andi Kleen wrote:
> With the inline version of static calls it is trying to use
> all static call functions inline. But this doesn't work for
> __static_call_return0, because its address is always taken,
> which forces the compiler to generate a out of line copy.
>
> If it only exists as a static inline this means there are
> many copies generated. Instead use the out of line in static_call.c
> for this.
>
> This fixes another bug. When _INLINE is set static_inline.c was
> not compiled at all, which disabled the self test even when
> it was enabled in the configuration.
>
> This fixes a build problem with gcc LTO. __static_call_return0
> is referenced from assembler, which requires making it global
> because the assembler can end in a different file than the other
> C code. But that's not possible for a static inline function.
This is ARCH=i386 only afaict, why do we care?
next prev parent reply other threads:[~2021-04-26 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 21:11 [PATCH] static_call: Use single copy of static_call_return0 Andi Kleen
2021-04-26 8:17 ` Peter Zijlstra [this message]
2021-04-26 14:47 ` Andi Kleen
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=YIZ2/2H4W1U5DNBm@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.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