[RFC] Refactored interrupt handling on ARM

Nathan Whitehorn nwhitehorn at freebsd.org
Mon Apr 14 22:00:15 UTC 2014


On 04/14/14 13:58, Jakub Klama wrote:
> On Mon, 14 Apr 2014 09:39:36 -0700, Nathan Whitehorn wrote:
>> This is really nice! One quick question: why have you made
>> FDT_MAP_IRQ() a public interface? Shouldn't calling the function it
>> maps to just be a private implementation detail in nexus?
>> -Nathan
>
> Well, FDT_MAP_IRQ() existed before my changes and was public. It just
> returned pin and discarded the node parameter:
>
> #define    FDT_MAP_IRQ(node, pin)    (pin)
>
> so I left it as is and changed the implementation to route IRQ to
> parent IC.
>
>

I had deliberately made it private with the last round of interrupt 
changes. The idea was to rely completely on newbus for interrupt 
mapping. Having a public interface allows code to bypass the bus 
hierarchy, which usually isn't a good thing. This ended up happening all 
over the place on PowerPC, for example. This made a lot of drivers less 
MI than they should have been and took a lot of time to get rid of.
-Nathan



More information about the freebsd-arm mailing list