On Fri, Nov 1, 2019 at 2:31 PM Stefano Stabellini via System-dt system-dt@lists.openampproject.org wrote:
No, there's numerous examples that *should* have used interrupt-map, but invented their own thing.
No. It's '*-map-pass-thru' and in the DT spec. Here's the commit adding it[1]. The motivation for this was GPIO, but the spec was written generically.
Rob
[1] https://github.com/devicetree-org/devicetree-specification/commit/32c96cd64d...
On Fri, 1 Nov 2019, Rob Herring wrote:
Thank you, that was very helpful! So if I read it right, it would turn it into this at the interrupt-multiplexer node:
#interrupt-cells = <3>;
/* copy all attributes from children to parents */ interrupt-map-pass-thru = <0xffffffff 0xffffffff 0xffffffff>;
/* mask all childres bits to always match the first 0x0 entries */ interrupt-map-mask = <0x0 0x0 0x0>;
/* child address cells, child interrupt cells, parent, parent interrupt cells */ interrupt-map = <0x0 0x0 0x0 &gic_a72 0x0 0x0 0x0>, <0x0 0x0 0x0 &gic_r5 0x0 0x0 0x0>;
The zero interrupt-map-mask would make sure that any children interrupts would match the two zero interrupt-map entries. The fully set interrupt-map-pass-thru would make sure that any children interrupts numbers and flags would be copied over to the parents.
On Fri, Nov 1, 2019 at 3:30 PM Stefano Stabellini stefano.stabellini@xilinx.com wrote:
I believe that's right. Of course, there's no kernel support for interrupt-map-pass-thru (there is for GPIO), and it in no way solves the problem of which entry to select. A simple way to solve this is to look for 'interrupt-parent' in the /cpus node when not found in the root node. The OS would just have to know which /cpus node to look in. That wouldn't work for existing OSs, but it's not major changes to dts files or OSs. For your case, interrupt-map is not even needed. For the complex case, you'd split interrupt-map for each GIC into each /cpus node.
Rob
system-dt@lists.openampproject.org