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: 50071 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5C074218C9 for ; Fri, 19 Jun 2015 08:49:00 +0000 (UTC) Received: by lbbwc1 with SMTP id wc1sf26546881lbb.3 for ; Fri, 19 Jun 2015 01:48:59 -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=SYMaFED+yKaCTVyCRmG+dK48+LhuSlrIB2d1hwmdc78=; b=fS65nrb5SBk5gCiQHiALQm9mbGiHQXLxYMCmT4xJQEuNW+KrFYCJDxLEy131f6Mk02 ZgfdheD16Fe8mI0Kf6cpaq+aMtZmFaNHmV34xBd5bbDWZ+IUVFdyIzhlTAmLJb/uAOCJ 4BioPWQ7+8KinKiALt+Y3d8NVnLtJsMi7UO3IgVyAZ/lesFa8KHlNNzo+vd8hcD4CZWV QsLyODfAxxwz3sptzq8NnfDqE5HvZC+shFHYiThhn/8hWqSIszsBbSYkLcog2eGtX+2H oOFcaunF8VGodh/TX4WGz8SXLdRVzHLm/uPap6M/ccwhcWo/JvaTbLshber+4Hn24FoD 32nA== X-Gm-Message-State: ALoCoQn6HjOGY3/yc3+4+X5HBuOSOdzAT5QkXbMa8twPKFWhEvMKFrjxyOsbazjV0chx7mYyqgcp X-Received: by 10.152.219.166 with SMTP id pp6mr14231864lac.1.1434703739264; Fri, 19 Jun 2015 01:48:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.197 with SMTP id ks5ls364070lac.64.gmail; Fri, 19 Jun 2015 01:48:59 -0700 (PDT) X-Received: by 10.112.166.132 with SMTP id zg4mr16745497lbb.3.1434703739122; Fri, 19 Jun 2015 01:48:59 -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 pt2si8610324lbb.46.2015.06.19.01.48.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 01:48:59 -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 labko7 with SMTP id ko7so70095777lab.2 for ; Fri, 19 Jun 2015 01:48:59 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr16419061lac.41.1434703738988; Fri, 19 Jun 2015 01:48:58 -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 hn6csp412770lbb; Fri, 19 Jun 2015 01:48:58 -0700 (PDT) X-Received: by 10.70.32.66 with SMTP id g2mr10342366pdi.82.1434703737334; Fri, 19 Jun 2015 01:48:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gp5si15340047pbb.69.2015.06.19.01.48.56; Fri, 19 Jun 2015 01:48:57 -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 S1754574AbbFSIsz (ORCPT + 6 others); Fri, 19 Jun 2015 04:48:55 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36296 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbbFSIrK (ORCPT ); Fri, 19 Jun 2015 04:47:10 -0400 Received: by paceq1 with SMTP id eq1so56392399pac.3 for ; Fri, 19 Jun 2015 01:47:09 -0700 (PDT) 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" Cc: Thomas Gleixner , Jiang Liu , Lorenzo Pieralisi , Arnd Bergmann , Tomasz Nowicki , Grant Likely , Olof Johansson , Wei Huang , 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 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> 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.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 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: