linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-tegra <linux-tegra@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Jon Hunter <jonathanh@nvidia.com>, Marc Zyngier <maz@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Android Kernel Team <kernel-team@android.com>,
	Rob Herring <robh@kernel.org>,
	Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH v2 2/2] of: property: Add fw_devlink support for interrupts
Date: Mon, 15 Feb 2021 00:29:53 -0800	[thread overview]
Message-ID: <CAGETcx9mzYbujVW8ALrNvs1FabvuUpZpChxBb0Tp8q7w+TY4=A@mail.gmail.com> (raw)
In-Reply-To: <a76a73e4-f7ba-4893-14b8-01d21943241a@roeck-us.net>

On Sun, Feb 14, 2021 at 7:58 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 2/14/21 1:12 PM, Saravana Kannan wrote:
> [ ... ]
> >
> > Can you please give me the following details:
> > * The DTS file for the board (not the SoC).
>
> The devicetree file extracted from the running system is attached.
> Hope it helps.

Hi Guenter,

Thanks for the DTS file and logs. That helps a lot.

Looking at the attachment and this line from the earlier email:
[   14.084606][   T11] pci 0005:01:00.0: probe deferral - wait for
supplier interrupt-controller@0

It's clear the PCI node is waiting on:
        interrupt-controller@0 {
                #address-cells = <0x00>;
                device_type = "PowerPC-Interrupt-Source-Controller";
                compatible = "ibm,opal-xive-vc\0IBM,opal-xics";
                #interrupt-cells = <0x02>;
                reg = <0x00 0x00 0x00 0x00>;
                phandle = <0x804b>;
                interrupt-controller;
        };

If I grep for "ibm,opal-xive-vc", I see only one instance of it in the
code. And that eventually ends up getting called like this:
irq_find_matching_fwspec() -> xive_irq_domain_match() -> xive_native_match()

static bool xive_native_match(struct device_node *node)
{
        return of_device_is_compatible(node, "ibm,opal-xive-vc");
}

However, when the IRQ domain are first registered, in xive_init_host()
the "np" passed in is NOT the same node that xive_native_match() would
match.
static void __init xive_init_host(struct device_node *np)
{
        xive_irq_domain = irq_domain_add_nomap(np, XIVE_MAX_IRQ,
                                               &xive_irq_domain_ops, NULL);
        if (WARN_ON(xive_irq_domain == NULL))
                return;
        irq_set_default_host(xive_irq_domain);
}

Instead, the "np" here is:
        interrupt-controller@6030203180000 {
                ibm,xive-provision-page-size = <0x10000>;
                ibm,xive-eq-sizes = <0x0c 0x10 0x15 0x18>;
                single-escalation-support;
                ibm,xive-provision-chips = <0x00>;
                ibm,xive-#priorities = <0x08>;
                compatible = "ibm,opal-xive-pe\0ibm,opal-intc";
                reg = <0x60302 0x3180000 0x00 0x10000 0x60302
0x3190000 0x00 0x10000 0x60302 0x31a0000 0x00 0x10000 0x60302
0x31b0000 0x00 0x10000>;
                phandle = <0x8051>;
        };

There are many ways to fix this, but I first want to make sure this is
a valid way to register irqdomains before trying to fix it. I just
find it weird that the node that's registered is unrelated (not a
parent/child) of the node that matches.

Marc,

Is this a valid way to register irqdomains? Just registering
interrupt-controller@6030203180000 DT node where there are multiple
interrupt controllers?

Thanks,
Saravana

  reply	other threads:[~2021-02-15  8:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 22:57 [PATCH v2 0/2] of: property: Add fw_devlink support for more props Saravana Kannan
2021-01-21 22:57 ` [PATCH v2 1/2] of: property: Add fw_devlink support for "gpio" and "gpios" binding Saravana Kannan
2021-01-22 12:58   ` Linus Walleij
2021-01-21 22:57 ` [PATCH v2 2/2] of: property: Add fw_devlink support for interrupts Saravana Kannan
     [not found]   ` <CGME20210204115252eucas1p2d145686f7a5dc7e7a04dddd0b0f2286c@eucas1p2.samsung.com>
2021-02-04 11:52     ` Marek Szyprowski
2021-02-04 21:31       ` Saravana Kannan
2021-02-05  7:38         ` Marek Szyprowski
2021-02-05  8:06           ` Geert Uytterhoeven
2021-02-05 10:05             ` Saravana Kannan
2021-02-05 10:20               ` Geert Uytterhoeven
2021-02-05 17:19                 ` Saravana Kannan
2021-02-05 17:51                   ` Geert Uytterhoeven
2021-02-05 17:55                     ` Saravana Kannan
2021-02-06  4:32                       ` Saravana Kannan
2021-02-08  8:14                         ` Marek Szyprowski
2021-02-08 23:57                           ` Saravana Kannan
2021-02-13 18:54   ` Guenter Roeck
2021-02-14 21:12     ` Saravana Kannan
2021-02-15  3:06       ` Guenter Roeck
2021-02-15  3:58       ` Guenter Roeck
2021-02-15  8:29         ` Saravana Kannan [this message]
2021-02-15  9:08           ` Marc Zyngier
2021-02-15 22:23             ` Saravana Kannan
2021-01-26  8:22 ` [PATCH v2 0/2] of: property: Add fw_devlink support for more props Greg Kroah-Hartman
     [not found] ` <20210131163823.c4zb47pl4tukcl7c@viti.kaiser.cx>
2021-01-31 21:05   ` Saravana Kannan
2021-02-01 10:52     ` Martin Kaiser
2021-02-01 20:04       ` Saravana Kannan
     [not found] <20210121191637.1067630-1-saravanak@google.com>
2021-01-21 19:16 ` [PATCH v2 2/2] of: property: Add fw_devlink support for interrupts Saravana Kannan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGETcx9mzYbujVW8ALrNvs1FabvuUpZpChxBb0Tp8q7w+TY4=A@mail.gmail.com' \
    --to=saravanak@google.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-team@android.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).