Skip to content

bpf, arm64/riscv: Remove redundant icache flush after pack allocator finalize

Puranjay Mohan bpf linux-arm-kernel linux-riscv lkml 2 versions Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesApplied 2/2
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Remove "#include <asm/cacheflush.h>" as it is not needed now.
- Add Acked-by: Song Liu <[email protected]>

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf, arm64: Remove redundant bpf_flush_icache() after pack allocator finalizearch/arm64/net/bpf_jit_comp.c+0 -124 repliesApplied
2/2bpf, riscv: Remove redundant bpf_flush_icache() after pack allocator finalizearch/riscv/net/bpf_jit.h arch/riscv/net/bpf_jit_core.c+0 -132 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSong LiuPu LehuiPaul ChaignonBreno Leitao
1/2A-b A-b
2/2A-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] bpf, arm64/riscv: Remove redundant icache flush after pack allocator finalize

Changelog:
v1: https://lore.kernel.org/all/[email protected]/
Changes in v2:
- Remove "#include <asm/cacheflush.h>" as it is not needed now.
- Add Acked-by: Song Liu <[email protected]>

When the BPF prog pack allocator was added for arm64 and riscv, the existing bpf_flush_icache() calls were retained after bpf_jit_binary_pack_finalize(). However, the finalize path copies the JITed code via architecture text patching routines (__text_poke on arm64, patch_text_nosync on riscv) that already perform a full flush_icache_range() internally. The subsequent bpf_flush_icache() repeats the same cache maintenance on the same range.

Remove the redundant flush and the now-unused bpf_flush_icache() definitions on both architectures.

Puranjay Mohan (2):
bpf, arm64: Remove redundant bpf_flush_icache() after pack allocator
finalize
bpf, riscv: Remove redundant bpf_flush_icache() after pack allocator
finalize

 arch/arm64/net/bpf_jit_comp.c | 12 ------------
 arch/riscv/net/bpf_jit.h      |  6 ------
 arch/riscv/net/bpf_jit_core.c |  7 -------
 3 files changed, 25 deletions(-)

base-commit: 71b500afd2f7336f5b6c6026f2af546fc079be26

Signature · 1 line
2.52.0