From patchwork Fri Jun 19 08:46:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 6643881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 24DE6C0020 for ; Fri, 19 Jun 2015 08:54:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 452CE20965 for ; Fri, 19 Jun 2015 08:54:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60F6920963 for ; Fri, 19 Jun 2015 08:54:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5s1F-0002oE-Ce; Fri, 19 Jun 2015 08:51:25 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5rxS-0007PM-Rn for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2015 08:47:31 +0000 Received: by paceq1 with SMTP id eq1so56392398pac.3 for ; Fri, 19 Jun 2015 01:47:09 -0700 (PDT) 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=eueJ5+M2wEKmCsyO2iPBxNCiUE8CIFov0+UlWz9f4sxl6nTzKWXQgkeJUMpLjQDKyU c8X6A5V0jYNLUjfMBctqKZRoOpI6q4uky0jrXeeA5VAYrjrDswA3EtTuMai2KR8KpqoK 0w10OBwOHzAhKiTEIDAGFgOEhHdNUR1Rh1U3ld7YV6dCI1G1/itk65zyPNfbiyIjFCLl Iu8lIT3gwyKL0SQsikICJmTp8tLamqDVw8GjVlp5nircnja5MLQkTVt0Uvtyd9qFIXk5 9TPLQxxIXXio0/UO8dnbleRbPFO3SnSPnOYRTrlHK2UJXMFSYsndGWvJ2h0WZnZbmIeY wHvw== X-Gm-Message-State: ALoCoQnkn2F50VRMqWsYsXgnOIyZRfsCnRauPz9nOAtC7on8kKdCKasVA4Psj3NUFowjRLJ6vPI2 X-Received: by 10.66.157.71 with SMTP id wk7mr29258534pab.99.1434703629849; Fri, 19 Jun 2015 01:47:09 -0700 (PDT) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id on3sm2086052pbc.48.2015.06.19.01.47.08 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jun 2015 01:47:09 -0700 (PDT) From: Hanjun Guo To: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" Subject: [PATCH v2 9/9] irqchip / GICv3: Add stacked irqdomain support for ACPI based init Date: Fri, 19 Jun 2015 16:46:12 +0800 Message-Id: <1434703572-26221-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434703572-26221-1-git-send-email-hanjun.guo@linaro.org> References: <1434703572-26221-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150619_014731_066253_0F9A356B X-CRM114-Status: GOOD ( 15.02 ) X-Spam-Score: -0.7 (/) Cc: Wei Huang , Lorenzo Pieralisi , Arnd Bergmann , linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org, Tomasz Nowicki , Olof Johansson , Hanjun Guo , Grant Likely , Thomas Gleixner , Jiang Liu , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: