Skip to content

Handle chaining of interrupt parent #58

Description

@bjorn3

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";
        };
    };

    // ...
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions