From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Jason Baron <jbaron@akamai.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ard Biesheuvel <ardb@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v4 0/4] Implement inline static calls on PPC32 - v4
Date: Tue, 3 Dec 2024 20:44:48 +0100 [thread overview]
Message-ID: <cover.1733245362.git.christophe.leroy@csgroup.eu> (raw)
This series implements inline static calls on PPC32.
First patch adds to static_call core the ability to pass the
trampoline address at the same time as the site address to
arch_static_call_transform() so that it can fallback on branching to
the trampoline when the site is too far (Max distance for direct
branch is 32 Mbytes on powerpc).
Second patch adds support for decoding all types of uncond branches.
Third patch rearranges function arch_static_call_transform() to ease
implementation of inline static call in following patch.
Last patch implements inline static calls on PPC32: This is done by:
- Put a 'bl' to the destination function ('b' if tail call)
- Put a 'nop' when the destination function is NULL ('blr' if tail call)
- Put a 'li r3,0' when the destination is the RET0 function and not
a tail call.
If the destination is too far (over the 32Mb limit), go via the
trampoline thanks to patch 1.
Christophe Leroy (4):
static_call_inline: Provide trampoline address when updating sites
objtool/powerpc: Add support for decoding all types of uncond branches
powerpc: Prepare arch_static_call_transform() for supporting inline
static calls
powerpc/static_call: Implement inline static calls
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/static_call.h | 2 +
arch/powerpc/kernel/static_call.c | 58 +++++++++++++++++++-------
arch/x86/kernel/static_call.c | 2 +-
kernel/static_call_inline.c | 2 +-
tools/objtool/arch/powerpc/decode.c | 8 +++-
6 files changed, 55 insertions(+), 18 deletions(-)
--
2.47.0
next reply other threads:[~2024-12-03 19:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 19:44 Christophe Leroy [this message]
2024-12-03 19:44 ` [PATCH v4 1/4] static_call_inline: Provide trampoline address when updating sites Christophe Leroy
2024-12-03 19:44 ` [PATCH v4 2/4] objtool/powerpc: Add support for decoding all types of uncond branches Christophe Leroy
2024-12-04 14:09 ` Segher Boessenkool
2025-02-25 8:05 ` [PATCH v5 " Christophe Leroy
2024-12-03 19:44 ` [PATCH v4 3/4] powerpc: Prepare arch_static_call_transform() for supporting inline static calls Christophe Leroy
2024-12-03 19:44 ` [PATCH v4 4/4] powerpc/static_call: Implement " Christophe Leroy
2024-12-04 20:09 ` kernel test robot
2025-03-02 4:40 ` [PATCH v4 0/4] Implement inline static calls on PPC32 - v4 Madhavan Srinivasan
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=cover.1733245362.git.christophe.leroy@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=x86@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).