Re: [PATCH] checks: Warn about missing #address-cells for interrupt parents

Brad Griffis <[email protected]>
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <[email protected]>
> From: Thierry Reding <[email protected]>
> 
> The device tree specification (v0.4) suggests that #address-cells is
> mandatory for interrupt parent nodes. If this property is missing, Linux
> will default to the value of 0.

Just to clarify, this relates to interrupt-map specifically. In that 
scenario the device tree spec requires that both the child node and 
parent node specify #address-cells and #interrupt-cells. It further 
specifies if a unit address component is not needed then it must be 
explicitly defined as zero. In other words, this does not seem to be 
just a suggestion, but more of a firm requirement.

> A number of device tree files rely on Linux' fallback and don't specify
> an explicit #address-cells as suggested by the specification. This can
> cause issues when these device trees are passed to software with a more
> pedantic interpretation of the DT spec.

The device tree spec also says that in the case where #address-cells is 
not specified that a value of 2 should be assumed. So in this context, I 
find the kernel's current practice of assuming #address-cells = <0> also 
violates the spec.

> Add a warning when this case is detected so that device tree files can
> be fixed.

I think a warning is reasonable, but perhaps we should consider making 
it an outright error. Though given the number of impacted device trees, 
perhaps that needs to be done in a couple of steps.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.