Re: irq: Invalid fwnode type (2) for irqdomain

From: Marc Zyngier
Date: Sat Jul 08 2017 - 05:45:43 EST


On Sat, Jul 08 2017 at 9:28:17 am BST, Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:

Hi Paul,


>> I've been reported an issue that is somewhat related to this, Any
>> chance you could give this[1] a go? I have no way to test it...
>
> The commit below indeed made the warning go away.
>
>> commit 6bf31c05f2a967e5351a3050ef51c18c8c9ee291
>> Author: Marc Zyngier <marc.zyngier@xxxxxxx>
>> Date:ÂÂÂThu Jul 6 14:51:31 2017 +0100
>>
>> ÂÂÂÂirqdomain: Allow ACPI device nodes to be used as irqdomain identifiers
>> ÂÂÂÂ
>> ÂÂÂÂA number of irqchip implementations are (ab)using the irqdomain
>> ÂÂÂÂallocator by passing a fwnode that is neither a FWNODE_OF or
>> ÂÂÂÂa FWNODE_IRQCHIP.
>> ÂÂÂÂ
>> ÂÂÂÂThis is pretty bad, but it also feels pretty crap to force these
>> ÂÂÂÂdrivers to allocate their own irqchip_fwid when they already have
>> ÂÂÂÂa proper fwnode.
>> ÂÂÂÂ
>> ÂÂÂÂInstead, let's teach the irqdomain allocator about ACPI device
>> ÂÂÂÂnodes, and add some lovely name generation code... Tested on
>> ÂÂÂÂan arm64 D05 system.
>> ÂÂÂÂ
>> ÂÂÂÂReported-by: John Garry <john.garry@xxxxxxxxxx>
>> ÂÂÂÂSigned-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
>
> I wonder if a warning/debug messages could and should still be shown,
> if a fwnode is neither a FWNODE_OF orÂa FWNODE_IRQCHIP.

With this patch, the code covers FWNODE_OF, FWNODE_IRQCHIP and
FWNODE_ACPI (the latter being the case you and John uncovered). Should
we get any other fwnode_type value, the irqdomain code will still warn
the user that this is not an object type we're ready to accept.

Thanks again for the report and the testing.

M.
--
Jazz is not dead. It just smells funny.