Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/arm/broadcom



On Nov 27, 2019, at 9:08 PM, Jason R Thorpe wrote:

+ firqh = kmem_alloc(sizeof(*firqh), KM_SLEEP);
+ firqh->ih_irq = firq;
+ firqh->ih_fn = func;
+ firqh->ih_arg = arg;
+ TAILQ_INSERT_TAIL(&firq->intr_handlers, firqh, ih_next);
+
+ return firqh;

I should have commented the code in gicv3 so that you would have realized it was “unnecessarily complicated” for a reason :)

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.


Home | Main Index | Thread Index | Old Index