riscv, bpf: Fix RV32 broken build, and silence RV64 warning
authorBjörn Töpel <bjorn@kernel.org>
Wed, 3 Nov 2021 11:54:53 +0000 (12:54 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 5 Nov 2021 15:52:34 +0000 (16:52 +0100)
commitf47d4ffe3a84ae11fc4bddc37939b9719467042c
treedf613c10795304aa34485fef29ea044b97ef82b5
parent8955c1a329873385775081e029d9a7c6aa9037e1
riscv, bpf: Fix RV32 broken build, and silence RV64 warning

Commit 252c765bd764 ("riscv, bpf: Add BPF exception tables") only addressed
RV64, and broke the RV32 build [1]. Fix by gating the exception tables code
with CONFIG_ARCH_RV64I.

Further, silence a "-Wmissing-prototypes" warning [2] in the RV64 BPF JIT.

  [1] https://lore.kernel.org/llvm/202111020610.9oy9Rr0G-lkp@intel.com/
  [2] https://lore.kernel.org/llvm/202110290334.2zdMyRq4-lkp@intel.com/

Fixes: 252c765bd764 ("riscv, bpf: Add BPF exception tables")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Tong Tiangen <tongtiangen@huawei.com>
Link: https://lore.kernel.org/bpf/20211103115453.397209-1-bjorn@kernel.org
arch/riscv/mm/extable.c
arch/riscv/net/bpf_jit_comp64.c