> On Nov 28, 2019, at 2:21 AM, Jared McNeill <jmcne...@invisible.ca> wrote: > > I should have commented the code in gicv3 so that you would have realized it > was “unnecessarily complicated” for a reason :)
Ok, I'll fix and add a comment. > > The interrupt_distribute(9) API makes an assumption that the return value of > anything_intr_establish can be used as input for the MD interrupt_distribute > implementation. For arm pic, struct intrsource * made most sense. It is a bit > of a hassle for fdtbus and really shows the need for an MI interrupt API. > > So where this breaks things is if you have something in the kernel do: > > Ih = fdtbus_intr_establish(…) > interrupt_distribute(ih, target, NULL) > > Currently the only place where this can happen is arch/arm/fdt/pmu_fdt.c but > IMHO the code is perfectly valid and could appear in other places in the > future. -- thorpej