devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Oliver O'Halloran" <oohall@gmail.com>
To: Haren Myneni <haren@linux.vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Device Tree <devicetree@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Michael Neuling <mikey@neuling.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	hbabu@us.ibm.com
Subject: Re: [PATCH 04/14] powerpc/vas: Setup IRQ mapping and register port for each window
Date: Wed, 18 Dec 2019 18:18:09 +1100	[thread overview]
Message-ID: <CAOSf1CEvZ32xC71siuyfUQEcQ4yLoDtj2jGoc3jrmsHc0jD+Vw@mail.gmail.com> (raw)
In-Reply-To: <1574816731.13250.9.camel@hbabu-laptop>

On Wed, Nov 27, 2019 at 12:07 PM Haren Myneni <haren@linux.vnet.ibm.com> wrote:
>
> *snip*
>
> @@ -36,7 +62,18 @@ static int init_vas_instance(struct platform_device *pdev)
>                 return -ENODEV;
>         }
>
> -       if (pdev->num_resources != 4) {
> +       rc = of_property_read_u64(dn, "ibm,vas-port", &port);
> +       if (rc) {
> +               pr_err("No ibm,vas-port property for %s?\n", pdev->name);
> +               /* No interrupts property */
> +               nresources = 4;
> +       }
> +
> +       /*
> +        * interrupts property is available with 'ibm,vas-port' property.
> +        * 4 Resources and 1 IRQ if interrupts property is available.
> +        */
> +       if (pdev->num_resources != nresources) {
>                 pr_err("Unexpected DT configuration for [%s, %d]\n",
>                                 pdev->name, vasid);
>                 return -ENODEV;

Right, so adding the IRQ in firmware will break the VAS driver in
existing kernels since it changes the resource count. This is IMO a
bug in the VAS driver that you should fix, but it does mean we need to
think twice about having firmware assign an interrupt at boot.

I had a closer look at this series and I'm not convinced that any
firmware changes are actually required either. We already have OPAL
calls for allocating an hwirq for the kernel to use and for getting
the IRQ's XIVE trigger port (see pnv_ocxl_alloc_xive_irq() for an
example). Why not use those here too? Doing so would allow us to
assign interrupts to individual windows too which might be useful for
the windows used by the kernel.

  parent reply	other threads:[~2019-12-18  7:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  1:05 [PATCH 04/14] powerpc/vas: Setup IRQ mapping and register port for each window Haren Myneni
2019-11-27  8:33 ` Christoph Hellwig
2019-12-18  7:18 ` Oliver O'Halloran [this message]
2019-12-18 23:13   ` Haren Myneni
2019-12-19 22:31     ` Haren Myneni

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=CAOSf1CEvZ32xC71siuyfUQEcQ4yLoDtj2jGoc3jrmsHc0jD+Vw@mail.gmail.com \
    --to=oohall@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haren@linux.vnet.ibm.com \
    --cc=hbabu@us.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=sukadev@linux.vnet.ibm.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).