All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/25] powerpc: ftrace optimisation and cleanup and more [v3]
@ 2022-05-09  5:35 ` Christophe Leroy
  0 siblings, 0 replies; 73+ messages in thread
From: Christophe Leroy @ 2022-05-09  5:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, naveen.n.rao
  Cc: linuxppc-dev, linux-kernel

This series provides optimisation and cleanup of ftrace on powerpc.

With this series ftrace activation is about 20% faster on an 8xx.

At the end of the series come additional cleanups around ppc-opcode,
that would likely conflict with this series if posted separately.

Change since v2:
- The only change in v3 is in patch 21, to fix sparse problems reported by the Robot.

Main changes since v1 (details in after each individual patch description):
- Added 3 patches (8, 9, 10) that convert PPC64_ELF_ABI_v{1/2} macros by CONFIG_PPC64_ELF_ABI_V{1/2}
- Taken comments from Naveen

Christophe Leroy (25):
  powerpc/ftrace: Refactor prepare_ftrace_return()
  powerpc/ftrace: Remove redundant create_branch() calls
  powerpc/code-patching: Inline is_offset_in_{cond}_branch_range()
  powerpc/ftrace: Use is_offset_in_branch_range()
  powerpc/code-patching: Inline create_branch()
  powerpc/ftrace: Inline ftrace_modify_code()
  powerpc/ftrace: Use patch_instruction() return directly
  powerpc: Add CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2
  powerpc: Replace PPC64_ELF_ABI_v{1/2} by CONFIG_PPC64_ELF_ABI_V{1/2}
  powerpc: Finalise cleanup around ABI use
  powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and
    PPC64
  powerpc/ftrace: Don't include ftrace.o for CONFIG_FTRACE_SYSCALLS
  powerpc/ftrace: Use CONFIG_FUNCTION_TRACER instead of
    CONFIG_DYNAMIC_FTRACE
  powerpc/ftrace: Remove ftrace_plt_tramps[]
  powerpc/ftrace: Use BRANCH_SET_LINK instead of value 1
  powerpc/ftrace: Use PPC_RAW_xxx() macros instead of opencoding.
  powerpc/ftrace: Use size macro instead of opencoding
  powerpc/ftrace: Simplify expected_nop_sequence()
  powerpc/ftrace: Minimise number of #ifdefs
  powerpc/inst: Add __copy_inst_from_kernel_nofault()
  powerpc/ftrace: Don't use copy_from_kernel_nofault() in
    module_trampoline_target()
  powerpc/inst: Remove PPC_INST_BRANCH
  powerpc/modules: Use PPC_LI macros instead of opencoding
  powerpc/inst: Remove PPC_INST_BL
  powerpc/opcodes: Remove unused PPC_INST_XXX macros

 arch/powerpc/Kconfig                     |   2 +-
 arch/powerpc/Makefile                    |  12 +-
 arch/powerpc/boot/Makefile               |   2 +
 arch/powerpc/include/asm/code-patching.h |  65 +++-
 arch/powerpc/include/asm/ftrace.h        |   4 +-
 arch/powerpc/include/asm/inst.h          |  13 +-
 arch/powerpc/include/asm/linkage.h       |   2 +-
 arch/powerpc/include/asm/module.h        |   2 -
 arch/powerpc/include/asm/ppc-opcode.h    |  22 +-
 arch/powerpc/include/asm/ppc_asm.h       |   4 +-
 arch/powerpc/include/asm/ptrace.h        |   2 +-
 arch/powerpc/include/asm/sections.h      |  24 +-
 arch/powerpc/include/asm/types.h         |   8 -
 arch/powerpc/kernel/fadump.c             |  13 +-
 arch/powerpc/kernel/head_64.S            |   2 +-
 arch/powerpc/kernel/interrupt_64.S       |   2 +-
 arch/powerpc/kernel/kprobes.c            |   6 +-
 arch/powerpc/kernel/misc_64.S            |   2 +-
 arch/powerpc/kernel/module.c             |   4 +-
 arch/powerpc/kernel/module_32.c          |  38 ++-
 arch/powerpc/kernel/module_64.c          |   7 +-
 arch/powerpc/kernel/ptrace/ptrace.c      |   6 -
 arch/powerpc/kernel/trace/Makefile       |   5 +-
 arch/powerpc/kernel/trace/ftrace.c       | 375 +++++++----------------
 arch/powerpc/kvm/book3s_interrupts.S     |   2 +-
 arch/powerpc/kvm/book3s_rmhandlers.S     |   2 +-
 arch/powerpc/lib/code-patching.c         |  49 +--
 arch/powerpc/lib/feature-fixups.c        |   2 +-
 arch/powerpc/net/bpf_jit.h               |   4 +-
 arch/powerpc/net/bpf_jit_comp.c          |   2 +-
 arch/powerpc/net/bpf_jit_comp64.c        |   4 +-
 arch/powerpc/platforms/Kconfig.cputype   |   6 +
 32 files changed, 271 insertions(+), 422 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-08-09  6:26 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  5:35 [PATCH v3 00/25] powerpc: ftrace optimisation and cleanup and more [v3] Christophe Leroy
2022-05-09  5:35 ` Christophe Leroy
2022-05-09  5:35 ` [PATCH v3 01/25] powerpc/ftrace: Refactor prepare_ftrace_return() Christophe Leroy
2022-05-09  5:35   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 02/25] powerpc/ftrace: Remove redundant create_branch() calls Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 03/25] powerpc/code-patching: Inline is_offset_in_{cond}_branch_range() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 04/25] powerpc/ftrace: Use is_offset_in_branch_range() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 05/25] powerpc/code-patching: Inline create_branch() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 06/25] powerpc/ftrace: Inline ftrace_modify_code() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 07/25] powerpc/ftrace: Use patch_instruction() return directly Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 08/25] powerpc: Add CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2 Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 09/25] powerpc: Replace PPC64_ELF_ABI_v{1/2} by CONFIG_PPC64_ELF_ABI_V{1/2} Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 10/25] powerpc: Finalise cleanup around ABI use Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 11/25] powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64 Christophe Leroy
2022-08-08 18:41   ` Nick Desaulniers
2022-08-08 18:41   ` Nick Desaulniers
2022-05-09  5:36   ` Christophe Leroy
2022-08-08 18:47   ` Nick Desaulniers
2022-08-08 18:47     ` Nick Desaulniers
2022-08-09  6:25     ` Naveen N. Rao
2022-08-09  6:25       ` Naveen N. Rao
2022-05-09  5:36 ` [PATCH v3 12/25] powerpc/ftrace: Don't include ftrace.o for CONFIG_FTRACE_SYSCALLS Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 13/25] powerpc/ftrace: Use CONFIG_FUNCTION_TRACER instead of CONFIG_DYNAMIC_FTRACE Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 14/25] powerpc/ftrace: Remove ftrace_plt_tramps[] Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 15/25] powerpc/ftrace: Use BRANCH_SET_LINK instead of value 1 Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 16/25] powerpc/ftrace: Use PPC_RAW_xxx() macros instead of opencoding Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 17/25] powerpc/ftrace: Use size macro " Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 18/25] powerpc/ftrace: Simplify expected_nop_sequence() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-18  9:45   ` Naveen N. Rao
2022-05-18  9:45     ` Naveen N. Rao
2022-05-18 10:08     ` Christophe Leroy
2022-05-18 10:08       ` Christophe Leroy
2022-05-18 11:19     ` Michael Ellerman
2022-05-18 11:19       ` Michael Ellerman
2022-05-18 12:03       ` Michael Ellerman
2022-05-18 12:03         ` Michael Ellerman
2022-05-18 12:12         ` Christophe Leroy
2022-05-18 12:12           ` Christophe Leroy
2022-05-18 17:03           ` Naveen N. Rao
2022-05-18 17:03             ` Naveen N. Rao
2022-05-18 12:04       ` Christophe Leroy
2022-05-18 12:04         ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 20/25] powerpc/inst: Add __copy_inst_from_kernel_nofault() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 21/25] powerpc/ftrace: Don't use copy_from_kernel_nofault() in module_trampoline_target() Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 22/25] powerpc/inst: Remove PPC_INST_BRANCH Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 23/25] powerpc/modules: Use PPC_LI macros instead of opencoding Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 24/25] powerpc/inst: Remove PPC_INST_BL Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-09  5:36 ` [PATCH v3 25/25] powerpc/opcodes: Remove unused PPC_INST_XXX macros Christophe Leroy
2022-05-09  5:36   ` Christophe Leroy
2022-05-24 11:09 ` [PATCH v3 00/25] powerpc: ftrace optimisation and cleanup and more [v3] Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.