Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1168635
| Path | csiph.com!aioe.org!news.ecp.fr!news2.arglkargh.de!news.mixmin.net!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Hanjun Guo <hanjun.guo@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 9/9] irqchip / GICv3: Add stacked irqdomain support for ACPI based init |
| Date | Fri, 19 Jun 2015 10:50:03 +0200 |
| Message-ID | <pD09R-2hv-39@gated-at.bofh.it> (permalink) |
| References | <pD09Q-2hv-11@gated-at.bofh.it> |
| X-Original-To | Marc Zyngier <marc.zyngier@arm.com>, Jason Cooper <jason@lakedaemon.net>, Will Deacon <will.deacon@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VOVObVn8xEByYSPn9veXhXIOVMD5VOxLENN/enu0cOk=; b=ZbX7aITl8CJSpQpY83tb9Wf93KGQkJogYBMqMEr02buuEVVUC6csqjE0kdxNorD6gJ avMcuGQ3BEwlmGZnRJppsjG4MM0gVV5KAExMW+pHazmYv3o1yIARxwNUU2hOyaPm4VE4 /KpREjVT8QRlc3YYOsFRVCLXG1UxIAc6X7NAYCprx3EN59/0aRaqL1UeiaaBcbGpJy8F 5tMWxqGVRBuE/OaU5v+A0dV/Y8Ftz9hP8Tvz5Zzlzjz+23K12c1GNFA/LXBAbB9rBNRb lRc84tHXpgz15irT2CzSJ85m593bzppq/KL2r9ppRNlh88niN7z3zQpv9FOyAGHB94hN Hp5w== |
| X-Gm-Message-State | ALoCoQnOvN1a3A/SBQhrOlBk+GCzkmkbuWw1DLTkfIpbF4DNic51n7/sM7gw1s3N7GteyLGDAkmX |
| X-Received | by 10.66.157.71 with SMTP id wk7mr29258534pab.99.1434703629849; Fri, 19 Jun 2015 01:47:09 -0700 (PDT) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 59 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Thomas Gleixner <tglx@linutronix.de>, Jiang Liu <jiang.liu@linux.intel.com>, Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>, Arnd Bergmann <arnd@arndb.de>, Tomasz Nowicki <tomasz.nowicki@linaro.org>, Grant Likely <grant.likely@linaro.org>, Olof Johansson <olof@lixom.net>, Wei Huang <wei@redhat.com>, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo <hanjun.guo@linaro.org> |
| X-Original-Date | Fri, 19 Jun 2015 16:46:12 +0800 |
| X-Original-Message-ID | <1434703572-26221-10-git-send-email-hanjun.guo@linaro.org> |
| X-Original-References | <1434703572-26221-1-git-send-email-hanjun.guo@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1168635 |
Show key headers only | View raw
Similar as stacked domain support for ACPI based GICv2 init, let
acpi_irq_domain point to the core domain of GICv3 and pass the
gsi as the arg to support stacked irqdomain.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
drivers/irqchip/irq-gic-v3.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index d2eef3c..a1c4c74 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -733,15 +733,21 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs, void *arg)
{
- int i, ret;
+ int i;
irq_hw_number_t hwirq;
- unsigned int type = IRQ_TYPE_NONE;
- struct of_phandle_args *irq_data = arg;
- ret = gic_irq_domain_xlate(domain, irq_data->np, irq_data->args,
- irq_data->args_count, &hwirq, &type);
- if (ret)
- return ret;
+ if (domain->of_node) { /* DT case */
+ int ret;
+ unsigned int type = IRQ_TYPE_NONE;
+ struct of_phandle_args *irq_data = arg;
+
+ ret = gic_irq_domain_xlate(domain, irq_data->np, irq_data->args,
+ irq_data->args_count, &hwirq, &type);
+ if (ret)
+ return ret;
+ } else { /* ACPI case */
+ hwirq = (irq_hw_number_t)*(u32 *)arg;
+ }
for (i = 0; i < nr_irqs; i++)
gic_irq_domain_map(domain, virq + i, hwirq + i);
@@ -1009,7 +1015,7 @@ gic_v3_acpi_init(struct acpi_table_header *table)
if (err)
goto out_redist_unmap;
- irq_set_default_host(gic_data.domain);
+ acpi_irq_domain = gic_data.domain;
return 0;
out_redist_unmap:
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/9] Add self-probe infrastructure and stacked irqdomain support for ACPI based GICv2/3 init Hanjun Guo <hanjun.guo@linaro.org> - 2015-06-19 10:50 +0200 [PATCH v2 7/9] irqchip / GICv3: Refactor gic_of_init() for GICv3 driver Hanjun Guo <hanjun.guo@linaro.org> - 2015-06-19 10:50 +0200 [PATCH v2 9/9] irqchip / GICv3: Add stacked irqdomain support for ACPI based init Hanjun Guo <hanjun.guo@linaro.org> - 2015-06-19 10:50 +0200
csiph-web