linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/8] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init
Date: Mon, 20 Jul 2015 18:45:42 +0100	[thread overview]
Message-ID: <55AD33C6.3000809@arm.com> (raw)
In-Reply-To: <1436525114-14425-5-git-send-email-hanjun.guo@linaro.org>

On 10/07/15 11:45, Hanjun Guo wrote:
> For now, ACPI based GICv2 is using the irq_default_domain as the
> ACPI core domain which is not scalable, also we don't support
> stacked irq domains in ACPI, this patch is trying to implement that.
> 
> Firstly, we need to find the irqdomain with GSI, because we use
> different model of mapping interrupt with device in ACPI than DT,
> in DT, we using the interrupt parent property to get the device
> node of irqchip for devices, that's why we need the matching function
> that match the device node with the one associated with the irqdomain.
> But for ACPI, we only can get the GSI which the device is using, no
> interrupt parent will be specified, then we need a mechanism to find
> GSI's (also the device's) irqdomain to make the code scalable.
> 
> Thanks to the usage of GSI, it is a flat hwirq number which is unique
> in the system, then we can get its associated irq domain by matching
> the GSI supported by this irqchip (see drawings below), then we can
> live without the token pointer matching the interrupt controller as
> DT did.
> 
>                   ------------      ---> gsi_base0
>                  |            |
>                  |            |
>   irqdomain <----| irqchip 0  |
>                  |            |
>                  |            |
>                  |____________|     ---> gsi_end0
> 
>                   ------------      ---> gsi_base1 (probably gsi_end0+1)
>                  |            |
>                  |            |
>   irqdomain <----| irqchip 1  |
>                  |            |
>                  |            |
>                  |____________|     ---> gsi_end1
> 
>                   .....
> 
> if a device is using GSI n, then we can find GSI's irqdomain by matching
> gsi_base <= n <= gsi_end.
> 
> For GIC, we only have one GICD, but the above model still valid. GICD
> structure in ACPI MADT defines System Vector Base in the GICD entry,
> which means the global system interrupt number where this GIC
> Distributor?s interrupt inputs start, then we can get the hwirq numbers
> supported by reading the register, so we can explictly get the GSI's
> associated irqdomain if the GSI is within the range of hwirq supported
> by this GICD.
> 
> Secondly, pass the GSI as the arg for domain's ops alloc() function
> when register the GSI, then we can take advantage of stacked irqdomains.

I'm sorry, but this doesn't make much sense to me.

This patch doesn't only convert GICv2 ACPI support to stacked domains,
it adds a whole new concept of "banks of wired interrupts".

Why do we need this? How relevant is that to making the ACPI code
stacked-domain aware? As far as I understand, only SPIs provided by the
GIC can be expressed as a GSI. And you can only have one GIC.

I'm more and more puzzled by this series.

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

  reply	other threads:[~2015-07-20 17:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 10:45 [PATCH v3 0/8] Add self-probe infrastructure and stacked irqdomain support for ACPI based GICv2/3 init Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 1/8] irqchip / GIC: Add GIC version support in ACPI MADT Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller Hanjun Guo
2015-07-17 23:15   ` Timur Tabi
2015-07-20  9:32     ` Hanjun Guo
2015-07-20 12:12       ` Timur Tabi
2015-07-20 12:48         ` Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 3/8] irqchip / GIC / ACPI: Use IRQCHIP_ACPI_DECLARE to simplify GICv2 init code Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 4/8] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init Hanjun Guo
2015-07-20 17:45   ` Marc Zyngier [this message]
2015-07-10 10:45 ` [PATCH v3 5/8] irqchip / GICv3: Refactor gic_of_init() for GICv3 driver Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 6/8] irqchip / GICv3: Add ACPI support for GICv3+ initialization Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 7/8] irqchip / GICv3: Add stacked irqdomain support for ACPI based init Hanjun Guo
2015-07-10 10:45 ` [PATCH v3 8/8] irqchip / gicv3 / ACPI: Add GICR support via GICC structures Hanjun Guo
2015-07-17 23:09 ` [Linaro-acpi] [PATCH v3 0/8] Add self-probe infrastructure and stacked irqdomain support for ACPI based GICv2/3 init Timur Tabi
2015-07-20  9:06   ` Hanjun Guo
2015-07-20 12:06     ` Timur Tabi

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=55AD33C6.3000809@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).