If the interrupt parent doesn't have a #interrupt-cells property, indicating that it is neither an interrupt controller nor interrupt nexus, Linux will follow the interrupt-parent property of the interrupt parent recursively until arriving at a node with the #interrupt-cells property. QEMU depends on this for the arm64 virt machine config. In the device tree snippet bellow virtio_mmio@a000000 resolves to / as interrupt parent as there is no interrupt-parent property, which then needs to resolve to intc@8000000 as interrupt parent.
This can't be implemented outside of this crate as LegacyInterrupts and ExtendedInterrupts depend on knowing the #interrupt-cells value of the interrupt parent.
/ {
interrupt-parent = <0x8002>;
dma-coherent;
model = "linux,dummy-virt";
#size-cells = <0x02>;
#address-cells = <0x02>;
compatible = "linux,dummy-virt";
// ...
virtio_mmio@a000000 {
dma-coherent;
interrupts = <0x00 0x10 0x01>;
reg = <0xa000000 0x200>;
compatible = "virtio,mmio";
};
// ...
intc@8000000 {
phandle = <0x8002>;
reg = <0x8000000 0x10000 0x8010000 0x10000>;
compatible = "arm,cortex-a15-gic";
ranges;
#size-cells = <0x02>;
#address-cells = <0x02>;
interrupt-controller;
#interrupt-cells = <0x03>;
v2m@8020000 {
phandle = <0x8003>;
reg = <0x8020000 0x1000>;
msi-controller;
compatible = "arm,gic-v2m-frame";
};
};
// ...
};
If the interrupt parent doesn't have a
#interrupt-cellsproperty, indicating that it is neither an interrupt controller nor interrupt nexus, Linux will follow theinterrupt-parentproperty of the interrupt parent recursively until arriving at a node with the#interrupt-cellsproperty. QEMU depends on this for the arm64 virt machine config. In the device tree snippet bellowvirtio_mmio@a000000resolves to/as interrupt parent as there is nointerrupt-parentproperty, which then needs to resolve tointc@8000000as interrupt parent.This can't be implemented outside of this crate as
LegacyInterruptsandExtendedInterruptsdepend on knowing the#interrupt-cellsvalue of the interrupt parent.