On 02/20/2018 10:03 AM, Peter Maydell wrote: > In some board or SoC models it is necessary to split a qemu_irq line > so that one input can feed multiple outputs. We currently have > qemu_irq_split() for this, but that has several deficiencies: > * it can only handle splitting a line into two > * it unavoidably leaks memory, so it can't be used > in a device that can be deleted > > Implement a qdev device that encapsulates splitting of IRQs, with a > configurable number of outputs. (This is in some ways the inverse of > the TYPE_OR_IRQ device.) > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > hw/core/Makefile.objs | 1 + > include/hw/core/split-irq.h | 57 +++++++++++++++++++++++++++++ > include/hw/irq.h | 4 +- > hw/core/split-irq.c | 89 > +++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 150 insertions(+), 1 deletion(-) > create mode 100644 include/hw/core/split-irq.h > create mode 100644 hw/core/split-irq.c
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~