[PATCH v2 0/2] powerpc64/bpf: Fix PCREL build breaks

Saket Kumar Bhaskar <[email protected]> Thu, 30 Jul 2026 11:16:01 +0530
Newsgroups org.ozlabs.lists.linuxppc-dev,org.kernel.vger.bpf,org.kernel.vger.linux-kernel
Message-ID <20260730054601._CalO76tlRqNJagIp7rI2hUXw2V5FueR_a40iWUsYb4@z>
This series fixes two build failures that occur when
CONFIG_PPC_KERNEL_PCREL is enabled on powerpc64.

Patch 1 fixes unused variable warnings in bpf_jit_emit_func_call_rel() by
moving variable declarations to their respective conditional blocks where
they are actually used, rather than declaring them at function scope.

Patch 2 fixes a linker error in arch_bpf_timed_may_goto() by using the
CFUNC() macro for external C function calls. The macro properly handles
the @notoc annotation required for PCREL builds, informing the linker
that TOC restoration is not needed.

Both issues were introduced by commit b55b6b9ad76c ("powerpc64/bpf: Add
powerpc64 JIT support for timed may_goto").

Changes in v2:
- Patch 1: Move variable declarations to conditional blocks instead of
  using __maybe_unused (feedback from Christophe)
- Patch 2: No changes

v1: https://lore.kernel.org/all/[email protected]/

Madhavan Srinivasan (1):
  powerpc64/bpf: Fix build break in bpf_jit_emit_func_call_rel()

Saket Kumar Bhaskar (1):
  powerpc64/bpf: Fix build break for arch_bpf_timed_may_goto

 arch/powerpc/net/bpf_jit_comp64.c     | 2 +-
 arch/powerpc/net/bpf_timed_may_goto.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.54.0