[RFC] Interrupt mapping documentation

Becky Bruce Becky.Bruce at freescale.com
Tue Jun 20 10:23:40 EST 2006


On Jun 19, 2006, at 6:17 PM, Benjamin Herrenschmidt wrote:

>
>> If there's any interrupt in the dev tree, there should be an  
>> interrupt
>> controller.  If the requirement is more strict than that, that's a
>> bug :-)
>
> Yes, I should make that clearer.

Yes, please!  These things might seem obvious, but I've been burned  
by somewhat arbitrary requirements enough in the past to be wary.    
Paranoid, even :)

>
>> Most "real" device trees (on a "real" OF) do not have "interrupt-
>> controller"
>> as the name of their main interrupt controller nodes.  This sounds
>> like a
>> spec bug.
>
> I haven't specified that it _should_ be called interrupt- 
> controller, but
> it's generally called that way at least on chrp/pSeries and I think
> there's an OF recommended practices RFC that says something around  
> those
> lines, so I changed the examples to reflect that.

If there's precedence for it, it's fine with me.  I was just curious  
about why it changed.  Personally, I'd rather see it as "pic",  
because that's more specific, and it's the actual device name, but  
it's not keeping me up at night.....

> In addition,
> the default-to-parent thing is something I'll remove from the spec and
> write that the absence of the property is undefined I think. We'll  
> keep
> the current behaviour in linux for now though.

That also works for me.  I'd rather have to specify more stuff in the  
tree and have it be crystal clear how it's interpreted and used.  So,  
is this true for just #address-cells, or does it affect #size-cells  
as well?

>
>>> The additions in the patch specify new requirements that don't seem
>>> to match up with the statement above.  In the new patch, #address-
>>> cells is listed as a required node for interrupt-controller nodes,
>>> there's no mention of inheritance from a parent,
>>
>> Inheritance from the parent does not exist, in real OF.  Absence of
>> #address-cells means "default to 2".  This needs to be fixed in DTC.
>
> Yes. Except that I will probably not do the "default to 2". The kernel
> doesn't do it and there might still be things relying on the old
> (broken) linux behaviour. Thus I'll probably spec it as undefined.

Sounds good.  The dtc should probably throw an error (or at least a  
warning) on this, so the trees get fixed.  I think I'd prefer to see  
an error - that will keep this problem from propagating any further.

>>
>> Just *require* #address-cells for everything with addressable sub- 
>> nodes,
>> at least in DTC.  Doesn't cost much, and no confusion anymore.
>
> Yes. We should do that.

I agree 100%.

>
> In the case of interrupt controllers/nexus, #address-cells is not for
> addressable sub-nodes though but for defining the format of unit
> interrupt specifiers for interrupt-childs which aren't necessary sub
> nodes... confusing heh ?

Um, yeah :)  I think with a little clarification it will be fine,  
though.

Thanks!
-B





More information about the Linuxppc-dev mailing list