Re: [PATCH bpf-next v5] m68k, bpf: Add initial BPF JIT compiler support
From: Kuan-Wei Chiu
Date: Sun Sep 27 2026 - 16:32:21 EST
On Sun, Sep 27, 2026 at 04:03:15PM +0200, Geert Uytterhoeven wrote:
> 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.
Ack. Will fix in the next version.
>
> > > 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.
>
I wasn't aware of this doc.
Will update it and send out v6 shortly.
Regards,
Kuan-Wei