linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	peterz@infradead.org, aik@ozlabs.ru, sv@linux.ibm.com,
	rostedt@goodmis.org, jpoimboe@redhat.com,
	naveen.n.rao@linux.vnet.ibm.com, mbenes@suse.cz
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH v1 0/4] Implement inline static calls on PPC32
Date: Wed, 25 May 2022 17:58:13 +0200	[thread overview]
Message-ID: <cover.1653494186.git.christophe.leroy@csgroup.eu> (raw)

This is first draft for implementing inline static calls on PPC32.

This series applies on top of the series v2 "objtool: Enable and implement --mcount option on powerpc"

For the time being only the case where functions are within 'bl' reach
is supported. Otherwise panic() is invoked.

For the other case, we'll need to use the trampoline we have at startup
before initialising inline static calls. But it seems that at the time
being once inline static calls are initialised we don't know anymore
where the trampoline was.
We'd need to keep the information somewhere (is the static_call_key ?)
We may also need to keep the information for when the trampoline itself
is out of 'bl' reach, in that case there is a trampoline setup by the
compiler and we'll need to remind the location of that trampoline. Guess
it should get saved somewhere when we initialise inline static calls ?

Christophe Leroy (4):
  Revert "objtool: Enable objtool to run only on files with ftrace
    enabled"
  objtool: Add R_REL32 macro
  static_call: Call static_call_init() from start_kernel()
  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             | 41 ++++++++++++-------
 init/main.c                                   |  1 +
 scripts/Makefile.build                        |  4 +-
 tools/objtool/arch/powerpc/include/arch/elf.h |  1 +
 tools/objtool/arch/x86/include/arch/elf.h     |  1 +
 tools/objtool/check.c                         | 10 ++---
 tools/objtool/orc_gen.c                       |  2 +-
 9 files changed, 41 insertions(+), 22 deletions(-)

-- 
2.35.3


             reply	other threads:[~2022-05-25 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 15:58 Christophe Leroy [this message]
2022-05-25 15:58 ` [RFC PATCH v1 1/4] Revert "objtool: Enable objtool to run only on files with ftrace enabled" Christophe Leroy
2022-05-25 16:34   ` Peter Zijlstra
2022-05-25 17:03     ` Christophe Leroy
2022-05-25 15:58 ` [RFC PATCH v1 2/4] objtool: Add R_REL32 macro Christophe Leroy
2022-05-25 16:40   ` Segher Boessenkool
2022-05-25 15:58 ` [RFC PATCH v1 3/4] static_call: Call static_call_init() from start_kernel() Christophe Leroy
2022-05-25 15:58 ` [RFC PATCH v1 4/4] powerpc/static_call: Implement inline static calls 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=cover.1653494186.git.christophe.leroy@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mbenes@suse.cz \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sv@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).