On Thu, Aug 6, 2020 at 5:12 AM Marc Zyngier <maz@xxxxxxxxxx> wrote:
On 2020-08-06 02:24, John Stultz wrote:
>> + if (par_np == np)
>> + par_np = NULL;
>> +
>> + /*
>> + * If there's a parent interrupt controller and none of the parent
>> irq
>> + * domains have been registered, that means the parent interrupt
>> + * controller has not been initialized yet. it's not time for this
>> + * interrupt controller to initialize. So, defer probe of this
>> + * interrupt controller. The actual initialization callback of this
>> + * interrupt controller can check for specific domains as necessary.
>> + */
>> + if (par_np && !irq_find_matching_host(np, DOMAIN_BUS_ANY))
>> + return -EPROBE_DEFER;
>
> Yep. We're getting caught on the irq_find_matching_host() check. I'm a
> little lost as when I look at the qcom,pdc node in the dtsi its not
> under a parent controller (instead the soc node).
> Not sure if that's an issue in the dtsi or if par_np check needs to
> ignore the soc node and pass null?
I think you have nailed it. This checks for a domain attached to
the driver we are about to probe, and this domain cannot possibly
exist. Instead, it is the *parent* this should check for, as we
depend on it for successful probing.
Duh! Looks like I made a copy-paste/typo error. The comment clearly
says I'm trying to check the parent and then I end up checking the
node getting registered. I'm sure this will fix it.
Actually Nial sent an email a few hours after your and he had found
the same issue. He even tested the fix with an irqchip driver and it
fixed the probe issue.
I'm assuming you'll put up the patch yourself. Please let me know if
you need me to send one.