linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/4] Implement inline static calls on PPC32
@ 2022-05-25 15:58 Christophe Leroy
  2022-05-25 15:58 ` [RFC PATCH v1 1/4] Revert "objtool: Enable objtool to run only on files with ftrace enabled" Christophe Leroy
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-05-25 15:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, peterz,
	aik, sv, rostedt, jpoimboe, naveen.n.rao, mbenes
  Cc: linuxppc-dev, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-25 17:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25 15:58 [RFC PATCH v1 0/4] Implement inline static calls on PPC32 Christophe Leroy
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

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).