From patchwork Mon May 18 12:59:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 48695 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C1E382121F for ; Mon, 18 May 2015 13:03:43 +0000 (UTC) Received: by labcd2 with SMTP id cd2sf5909685lab.0 for ; Mon, 18 May 2015 06:03:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=fJvHev4B0LiTMc3YqE4SSajtXxaEE1bdIFPBX/Z42Tc=; b=fXEOKeKhpo7RSNMjeZA0/XSi869Kcb5Ht6hTm3L1uOxfuu51aGH/Tu5TgB92V+GpHx QRQjwYzR9vVmYqNSNuuul88jmWZPODQDZcweVtojOFQuWWE4ZSU4lwmUePzuljCLOlgm ELDKjvothoKKRc+n7JiWNUHIfg/bZ8GgSZMg10mzQPpTLoFJM+YNRSpG6wDnKPmO61Hu WXOTQl1bkwLtQMkAGhhRWvrOW0NKsLjba00IH1WNLFUWWXu5EGcGpi7AwOuChBgEZxXi yyZE0hKyIvLM+7v/1Jk3AtyGrlfFfjAGhaGZRxXUIIoCgv7X56ZBvm3glCdeZivtU5Dn uCkw== X-Gm-Message-State: ALoCoQkH0gHXTeXVhPqvSlEVsTK6/il5/u6jN+Us315ktrjk9H0c9ETd/9b+c9dCwrK43yZj0cSI X-Received: by 10.112.219.200 with SMTP id pq8mr17795547lbc.7.1431954222693; Mon, 18 May 2015 06:03:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.101 with SMTP id p5ls825988laj.53.gmail; Mon, 18 May 2015 06:03:42 -0700 (PDT) X-Received: by 10.152.7.209 with SMTP id l17mr17496726laa.100.1431954222419; Mon, 18 May 2015 06:03:42 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id dp7si6645024lbc.155.2015.05.18.06.03.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 06:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labbd9 with SMTP id bd9so219013564lab.2 for ; Mon, 18 May 2015 06:03:42 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr9749858lbc.73.1431954221906; Mon, 18 May 2015 06:03:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp70078lbb; Mon, 18 May 2015 06:03:40 -0700 (PDT) X-Received: by 10.68.135.73 with SMTP id pq9mr44082639pbb.46.1431954217082; Mon, 18 May 2015 06:03:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id or3si15915641pdb.190.2015.05.18.06.03.36; Mon, 18 May 2015 06:03:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751035AbbERNDf (ORCPT + 7 others); Mon, 18 May 2015 09:03:35 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36398 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbbERNAS (ORCPT ); Mon, 18 May 2015 09:00:18 -0400 Received: by pdfh10 with SMTP id h10so148825759pdf.3 for ; Mon, 18 May 2015 06:00:18 -0700 (PDT) X-Received: by 10.68.192.98 with SMTP id hf2mr15537750pbc.142.1431954017954; Mon, 18 May 2015 06:00:17 -0700 (PDT) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id f1sm10070330pdp.24.2015.05.18.06.00.16 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 18 May 2015 06:00:17 -0700 (PDT) From: Hanjun Guo To: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" Cc: Jiang Liu , Lorenzo Pieralisi , Arnd Bergmann , Tomasz Nowicki , Grant Likely , Thomas Gleixner , Olof Johansson , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH 09/11] irqchip / GICv3: Add stacked irqdomain support for ACPI based init Date: Mon, 18 May 2015 20:59:19 +0800 Message-Id: <1431953961-22706-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431953961-22706-1-git-send-email-hanjun.guo@linaro.org> References: <1431953961-22706-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 11946a6..e7f134e 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); @@ -1012,7 +1018,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: