From patchwork Wed Sep 14 14:21:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 76206 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1902691qgf; Wed, 14 Sep 2016 07:24:07 -0700 (PDT) X-Received: by 10.66.243.80 with SMTP id ww16mr4995668pac.19.1473863047632; Wed, 14 Sep 2016 07:24:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d129si33736052pfa.184.2016.09.14.07.24.07; Wed, 14 Sep 2016 07:24:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933229AbcINOXw (ORCPT + 27 others); Wed, 14 Sep 2016 10:23:52 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:32365 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933144AbcINOXr (ORCPT ); Wed, 14 Sep 2016 10:23:47 -0400 Received: from 172.24.1.60 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.60]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DNB48946; Wed, 14 Sep 2016 22:23:26 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Wed, 14 Sep 2016 22:23:16 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" , Marc Zyngier , Lorenzo Pieralisi CC: , , , Thomas Gleixner , "Bjorn Helgaas" , Greg KH , "Tomasz Nowicki" , Ma Jun , Kefeng Wang , Charles Garcia-Tobin , , Hanjun Guo Subject: [RFC PATCH v2 06/11] msi: platform: make platform_msi_create_device_domain() ACPI aware Date: Wed, 14 Sep 2016 22:21:14 +0800 Message-ID: <1473862879-7769-7-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1473862879-7769-1-git-send-email-guohanjun@huawei.com> References: <1473862879-7769-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.57D95D5E.035E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6d030b8d4374c50570642d544b70c8b1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hanjun Guo With the platform msi domain created for ITS, irqchip such as mbi-gen connecting ITS, which needs ctreate its own irqdomain. Fortunately with the platform msi support upstreamed by Marc, we just need to add minor code to make it run properly. platform_msi_create_device_domain() is almost ready for ACPI use except of_node_to_fwnode() is for dt only, make it ACPI aware then things will work in both DTS and ACPI. Cc: Marc Zyngier Cc: Greg KH Cc: Thomas Gleixner Cc: Bjorn Helgaas Signed-off-by: Hanjun Guo --- drivers/base/platform-msi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.7.12.4 diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c index f6eae18..9a550a8 100644 --- a/drivers/base/platform-msi.c +++ b/drivers/base/platform-msi.c @@ -338,16 +338,17 @@ platform_msi_create_device_domain(struct device *dev, { struct platform_msi_priv_data *data; struct irq_domain *domain; + struct fwnode_handle *fwnode; int err; data = platform_msi_alloc_priv_data(dev, nvec, write_msi_msg); if (IS_ERR(data)) return NULL; + fwnode = dev->of_node ? &dev->of_node->fwnode : dev->fwnode; data->host_data = host_data; domain = irq_domain_create_hierarchy(dev->msi_domain, 0, nvec, - of_node_to_fwnode(dev->of_node), - ops, data); + fwnode, ops, data); if (!domain) goto free_priv;