From patchwork Tue May 5 13:50:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 48037 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9759320553 for ; Tue, 5 May 2015 13:54:14 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf42888953wic.3 for ; Tue, 05 May 2015 06:54:13 -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=UvGbx5WuwpDXJtTdQxY5OHF+yjMC90VPHoXVtibFmcg=; b=TSEgRXq7DagtPqeZrEfLeC+H6rSc3ux4bVdCpESyFRg82IpoHQG7BzdkPTwN83Gir5 39eP+YGfzpBRMtHBCF7FYedAOQx9mLTI0mSQiCLOGH9zDW4SK6Luuq709kGswtkA6xsz LMu78/EFFO/8qAYd1hy171d6hxcHYorO9gSposjmdgaByU7cOTVkSkv+2N9JdX4CP8cb /UoVV++GTVJ2+axFRP/XwOxB3kLizV6UwYzrBwrKFzh9MFwQlhHZSuYoqiCmd3bHpewd nep5slxs9JVtsywpSp9liBziSy1iLEn+2odiln039h9ahYEkQpwB1QDmSJAWFVw14M+b LmNQ== X-Gm-Message-State: ALoCoQlkaEMMyVj4X5Fz2ryfRc+Jenx5lmu03fn08XukxyOXnNFMCftibmGGjrqP8qaxCWnrMtyS X-Received: by 10.152.203.233 with SMTP id kt9mr22269781lac.7.1430834053846; Tue, 05 May 2015 06:54:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.162 with SMTP id l2ls894408lal.93.gmail; Tue, 05 May 2015 06:54:13 -0700 (PDT) X-Received: by 10.152.25.167 with SMTP id d7mr24253990lag.108.1430834053671; Tue, 05 May 2015 06:54:13 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id j11si12503153lbg.95.2015.05.05.06.54.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2015 06:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labbd9 with SMTP id bd9so128047065lab.2 for ; Tue, 05 May 2015 06:54:13 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr11731161lbc.19.1430834053545; Tue, 05 May 2015 06:54:13 -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.67.65 with SMTP id l1csp2263020lbt; Tue, 5 May 2015 06:54:12 -0700 (PDT) X-Received: by 10.70.133.170 with SMTP id pd10mr51913851pdb.127.1430834051823; Tue, 05 May 2015 06:54:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si18999204pat.40.2015.05.05.06.54.10; Tue, 05 May 2015 06:54:11 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992830AbbEENyG (ORCPT + 29 others); Tue, 5 May 2015 09:54:06 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:32853 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992731AbbEENxR (ORCPT ); Tue, 5 May 2015 09:53:17 -0400 Received: by pdbnk13 with SMTP id nk13so196749506pdb.0 for ; Tue, 05 May 2015 06:53:17 -0700 (PDT) X-Received: by 10.66.248.195 with SMTP id yo3mr17223194pac.123.1430833997271; Tue, 05 May 2015 06:53:17 -0700 (PDT) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id fu7sm16189211pac.26.2015.05.05.06.53.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 May 2015 06:53:15 -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: [RFC PATCH 9/9] irqchip / GICv3: Add stacked irqdomain support for ACPI based init Date: Tue, 5 May 2015 21:50:57 +0800 Message-Id: <1430833857-30736-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430833857-30736-1-git-send-email-hanjun.guo@linaro.org> References: <1430833857-30736-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.42 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: