All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Zeev Zilberman <zeev@amazon.com>, Hanna Hawa <hhhawa@amazon.com>,
	tsahee@annapurnalabs.com, antoine.tenart@bootlin.com,
	linux@armlinux.org.uk, catalin.marinas@arm.com,
	will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org,
	tglx@linutronix.de, jason@lakedaemon.net, ronenk@amazon.com,
	dwmw@amazon.co.uk, vaerov@amazon.com, alisaidi@amazon.com,
	talel@amazon.com, jonnyc@amazon.com, hanochu@amazon.com,
	barakw@amazon.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 7/7] irqchip/al-msi: Add ACPI support
Date: Fri, 12 Apr 2019 17:45:34 +0100	[thread overview]
Message-ID: <20190412164534.GA9071@red-moon> (raw)
In-Reply-To: <a882317e-1f19-3bed-b790-10b8b8a3e839@arm.com>

On Fri, Apr 12, 2019 at 01:08:00PM +0100, Marc Zyngier wrote:
> Hi Zeev,
> 
> On 04/04/2019 15:45, Zeev Zilberman wrote:
> > Hi Marc,
> > 
> > We have considered exposing our interrupt controller both via MADT 
> > OEM-specific entry and via DSDT.
> > We've chosen MADT OEM-specific entry, because it seemed like a 
> > reasonable placeholder for custom interrupt controller, but we can move 
> > to DSDT, if this seems like a better way to represent it.
> > 
> > Either way we chose, we'll need to solve the ordering issue of the 
> > drivers probing.
> > The desired order of driver probing in the system, because of the 
> > dependencies, is:
> > GIC -> AL MSIX controller driver -> PCI
> > If we keep using MADT, we can't just use IRQCHIP_DECLARE, because there 
> > is no way we found to control ordering of MADT probing. So, GIC might be 
> > probed after our driver in this case.
> > The reason we used early_initcall, is that the early_initcalls are 
> > invoked after MADT probing in the system (and before DSDT probing).
> > 
> > If we move to using DSDT we need to solve the ordering problem from 
> > another direction - make sure that MSIX driver is probed before PCI.
> > In the patches that were posted for xgene interrupt controller (and 
> > weren't accepted) we saw that they proposed to solve the same issue
> > by modifying ACPI subsystem code by defining a new type for msi drivers 
> > and probing them before PCI drivers 
> > (https://patchwork.ozlabs.org/patch/818771/).
> >  From the feedback on that patch 
> > (https://patchwork.ozlabs.org/cover/818767/#1788415) it seemed that 
> > alternative solution is in the works,
> > but we didn't manage to find any followup on this.
> > 
> > We would be glad to hear what you propose for fixing the ordering issue 
> > and rework the patches accordingly.
> 
> There are multiple issues here, but the main one is that you're trying
> to do something that is completely contrary to the ACPI spec by
> inventing a new interrupt controller.
> 
> The use case for ACPI is quite simple: you have HW that matches the ACPI
> spec, and everything will work out of the box. This means GICv2+GICv2m
> or GICv3+ITS. There is zero space for creativity. Now, if you want your
> own interrupt controller, the only choice is to stick with DT. That's
> the place for weird and wonderful stuff that ACPI cannot support.
> 
> We've been around the block with XGene, and every "solution" was just
> utter crap, prone to failure and in the end unmaintainable. Anything
> involving an initcall definitely falls into that category.
> 
> I'll let Lorenzo speak his mind as the arm64 ACPI maintainer, but from
> an irqchip perspective, I can't see how to support this unless we get
> the ACPI spec to support this type of configuration.

That's pretty much it, as a matter of fact there is not much we can do,
actually it is a problem that {should have been/can be} solved first at
ACPI spec level, every kludge we put together to fix eg Xgene ended up
having implicit dependencies/requirements on firmware that are
non-existing from an ACPI spec binding perspective (eg DSDT objects
ordering).

It is not a kernel problem, however we put it, we can't guess an
IRQ controllers dependency that can't be described.

Lorenzo

WARNING: multiple messages have this Message-ID (diff)
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: catalin.marinas@arm.com, will.deacon@arm.com, jonnyc@amazon.com,
	ronenk@amazon.com, vaerov@amazon.com, linux@armlinux.org.uk,
	talel@amazon.com, linux-acpi@vger.kernel.org,
	alisaidi@amazon.com, lenb@kernel.org, jason@lakedaemon.net,
	antoine.tenart@bootlin.com, Zeev Zilberman <zeev@amazon.com>,
	tglx@linutronix.de, hanochu@amazon.com,
	linux-arm-kernel@lists.infradead.org, barakw@amazon.com,
	Hanna Hawa <hhhawa@amazon.com>,
	rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
	tsahee@annapurnalabs.com, dwmw@amazon.co.uk
Subject: Re: [PATCH 7/7] irqchip/al-msi: Add ACPI support
Date: Fri, 12 Apr 2019 17:45:34 +0100	[thread overview]
Message-ID: <20190412164534.GA9071@red-moon> (raw)
In-Reply-To: <a882317e-1f19-3bed-b790-10b8b8a3e839@arm.com>

On Fri, Apr 12, 2019 at 01:08:00PM +0100, Marc Zyngier wrote:
> Hi Zeev,
> 
> On 04/04/2019 15:45, Zeev Zilberman wrote:
> > Hi Marc,
> > 
> > We have considered exposing our interrupt controller both via MADT 
> > OEM-specific entry and via DSDT.
> > We've chosen MADT OEM-specific entry, because it seemed like a 
> > reasonable placeholder for custom interrupt controller, but we can move 
> > to DSDT, if this seems like a better way to represent it.
> > 
> > Either way we chose, we'll need to solve the ordering issue of the 
> > drivers probing.
> > The desired order of driver probing in the system, because of the 
> > dependencies, is:
> > GIC -> AL MSIX controller driver -> PCI
> > If we keep using MADT, we can't just use IRQCHIP_DECLARE, because there 
> > is no way we found to control ordering of MADT probing. So, GIC might be 
> > probed after our driver in this case.
> > The reason we used early_initcall, is that the early_initcalls are 
> > invoked after MADT probing in the system (and before DSDT probing).
> > 
> > If we move to using DSDT we need to solve the ordering problem from 
> > another direction - make sure that MSIX driver is probed before PCI.
> > In the patches that were posted for xgene interrupt controller (and 
> > weren't accepted) we saw that they proposed to solve the same issue
> > by modifying ACPI subsystem code by defining a new type for msi drivers 
> > and probing them before PCI drivers 
> > (https://patchwork.ozlabs.org/patch/818771/).
> >  From the feedback on that patch 
> > (https://patchwork.ozlabs.org/cover/818767/#1788415) it seemed that 
> > alternative solution is in the works,
> > but we didn't manage to find any followup on this.
> > 
> > We would be glad to hear what you propose for fixing the ordering issue 
> > and rework the patches accordingly.
> 
> There are multiple issues here, but the main one is that you're trying
> to do something that is completely contrary to the ACPI spec by
> inventing a new interrupt controller.
> 
> The use case for ACPI is quite simple: you have HW that matches the ACPI
> spec, and everything will work out of the box. This means GICv2+GICv2m
> or GICv3+ITS. There is zero space for creativity. Now, if you want your
> own interrupt controller, the only choice is to stick with DT. That's
> the place for weird and wonderful stuff that ACPI cannot support.
> 
> We've been around the block with XGene, and every "solution" was just
> utter crap, prone to failure and in the end unmaintainable. Anything
> involving an initcall definitely falls into that category.
> 
> I'll let Lorenzo speak his mind as the arm64 ACPI maintainer, but from
> an irqchip perspective, I can't see how to support this unless we get
> the ACPI spec to support this type of configuration.

That's pretty much it, as a matter of fact there is not much we can do,
actually it is a problem that {should have been/can be} solved first at
ACPI spec level, every kludge we put together to fix eg Xgene ended up
having implicit dependencies/requirements on firmware that are
non-existing from an ACPI spec binding perspective (eg DSDT objects
ordering).

It is not a kernel problem, however we put it, we can't guess an
IRQ controllers dependency that can't be described.

Lorenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-04-12 16:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31 12:35 [PATCH 5/7] ACPI / irq: Add GSI IRQ domain getter function Hanna Hawa
2019-03-31 12:35 ` Hanna Hawa
2019-03-31 12:35 ` Hanna Hawa
2019-03-31 12:35 ` [PATCH 6/7] irqchip/al-msi: Refactor in preparation to add ACPI support Hanna Hawa
2019-03-31 12:35   ` Hanna Hawa
2019-03-31 12:35   ` Hanna Hawa
2019-03-31 12:35 ` [PATCH 7/7] irqchip/al-msi: Add " Hanna Hawa
2019-03-31 12:35   ` Hanna Hawa
2019-03-31 12:35   ` Hanna Hawa
2019-04-01  2:15   ` Marc Zyngier
2019-04-01  2:15     ` Marc Zyngier
2019-04-01  2:15     ` Marc Zyngier
2019-04-04 14:45     ` Zeev Zilberman
2019-04-04 14:45       ` Zeev Zilberman
2019-04-04 14:45       ` Zeev Zilberman
2019-04-12 12:08       ` Marc Zyngier
2019-04-12 12:08         ` Marc Zyngier
2019-04-12 16:45         ` Lorenzo Pieralisi [this message]
2019-04-12 16:45           ` Lorenzo Pieralisi
2019-04-26  9:49         ` Alexander Graf
2019-04-26  9:49           ` Alexander Graf

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=20190412164534.GA9071@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=alisaidi@amazon.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=barakw@amazon.com \
    --cc=catalin.marinas@arm.com \
    --cc=dwmw@amazon.co.uk \
    --cc=hanochu@amazon.com \
    --cc=hhhawa@amazon.com \
    --cc=jason@lakedaemon.net \
    --cc=jonnyc@amazon.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=ronenk@amazon.com \
    --cc=talel@amazon.com \
    --cc=tglx@linutronix.de \
    --cc=tsahee@annapurnalabs.com \
    --cc=vaerov@amazon.com \
    --cc=will.deacon@arm.com \
    --cc=zeev@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.