Skip to content

Commit e6ef4eb

Browse files
Abhishek Dubeymaddy-kerneldev
authored andcommitted
powerpc32/bpf: fix loading fsession func metadata using PPC_LI32
PPC_RAW_LI32 is not a valid macro in the PowerPC BPF JIT. Use PPC_LI32, which correctly handles immediate loads for large values. Fixes the build error introduced when adding fsession support on ppc32. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202604040212.jIxEd2DW-lkp@intel.com/ Fixes: 92258b5 ("powerpc32/bpf: Add fsession support") Signed-off-by: Abhishek Dubey <adubey@linux.ibm.com> Reviewed-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20260408055301.232745-1-adubey@linux.ibm.com
1 parent e1f7a0e commit e6ef4eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/powerpc/net/bpf_jit_comp32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ void store_func_meta(u32 *image, struct codegen_context *ctx,
150150
* func_meta := argument count in first byte + cookie value
151151
*/
152152
/* Store lower word */
153-
EMIT(PPC_RAW_LI32(bpf_to_ppc(TMP_REG), (u32)func_meta));
153+
PPC_LI32(bpf_to_ppc(TMP_REG), (u32)func_meta);
154154
EMIT(PPC_RAW_STW(bpf_to_ppc(TMP_REG), _R1, func_meta_off));
155155

156156
/* Store upper word */
157-
EMIT(PPC_RAW_LI32(bpf_to_ppc(TMP_REG), (u32)(func_meta >> 32)));
157+
PPC_LI32(bpf_to_ppc(TMP_REG), (u32)(func_meta >> 32));
158158
EMIT(PPC_RAW_STW(bpf_to_ppc(TMP_REG), _R1, func_meta_off + 4));
159159
}
160160

0 commit comments

Comments
 (0)