aboutsummaryrefslogtreecommitdiff
path: root/drivers/cdx/controller/mcdi_functions.c
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2023-10-20 19:43:54 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2023-10-23 20:33:19 +1100
commit465cabc97b42405eb89380ea6ba8d8b03e4ae1a2 (patch)
treea4b39c07640dcee39428de047bb6cf2c3cbccad4 /drivers/cdx/controller/mcdi_functions.c
parentaad26d3b6af13c055b1d05dd253d2484551bde55 (diff)
powerpc/code-patching: introduce patch_instructions()
patch_instruction() entails setting up pte, patching the instruction, clearing the pte and flushing the tlb. If multiple instructions need to be patched, every instruction would have to go through the above drill unnecessarily. Instead, introduce patch_instructions() function that sets up the pte, clears the pte and flushes the tlb only once per page range of instructions to be patched. Duplicate most of the patch_instruction() code instead of merging with it, to avoid the performance degradation observed on ppc32, for patch_instruction(), with the code path merged. Also, setup poking_init() always as BPF expects poking_init() to be setup even when STRICT_KERNEL_RWX is off. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Acked-by: Song Liu <song@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231020141358.643575-2-hbathini@linux.ibm.com
Diffstat (limited to 'drivers/cdx/controller/mcdi_functions.c')
0 files changed, 0 insertions, 0 deletions