Re: [PATCH bpf-next v5] m68k, bpf: Add initial BPF JIT compiler support
From: Geert Uytterhoeven
Date: Sun Sep 27 2026 - 10:09:35 EST
Hi Kuan-Wei,
On Fri, 28 Aug 2026 at 12:50, Greg Ungerer <gerg@xxxxxxxxxxxx> wrote:
> On 24/8/26 02:38, Kuan-Wei Chiu wrote:
> > Add a BPF JIT compiler for the m68k architecture.
> >
> > The JIT generates m68k machine code targeting m68020+ processors and
> > coldfire parts with an mmu (ISA_B/ISA_C). It excludes plain 68000/68010
> > and non-mmu coldfire processors, as it relies on 32-bit branch
> > displacements (b<cc>.l) to handle large bpf programs.
> >
> > Tested with the test_bpf.ko:
> > test_bpf: Summary: 1061 PASSED, 0 FAILED, [1049/1049 JIT'ed]
> > test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
> >
> > Tested-by: Daniel Palmer <daniel@xxxxxxxxx>
> > Signed-off-by: Kuan-Wei Chiu <visitorckw@xxxxxxxxx>
Thanks for your (impressive) patch!
> From here it is really up to Geert now if and when he will pick this up.
> I am happy with this patch in its current form.
Who am I to block this feature? ;-)
> > --- a/arch/m68k/Kconfig
> > +++ b/arch/m68k/Kconfig
> > @@ -8,6 +8,7 @@ config M68K
> > select ARCH_HAS_CPU_FINALIZE_INIT if MMU
> > select ARCH_HAS_CURRENT_STACK_POINTER
> > select ARCH_HAS_DMA_PREP_COHERENT if M68K_NONCOHERENT_DMA && !COLDFIRE
> > + select HAVE_EBPF_JIT if MMU
Pleave move this to the other "select HAVE_*" lines below, to preserve
sort order.
> > select ARCH_HAS_SYNC_DMA_FOR_DEVICE if M68K_NONCOHERENT_DMA
> > select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
> > select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
I think you should also update
Documentation/features/core/eBPF-JIT/arch-support.txt.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds