Message ID | 20170808122259.6299-6-rrichter@cavium.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82CC560384 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Aug 2017 12:33:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 726192888E for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Aug 2017 12:33:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6702728892; Tue, 8 Aug 2017 12:33:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E02402888E for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Aug 2017 12:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AiEGz/nqFSVUX1p0XOslrJnMJgg6TKazvMKiEgngRbU=; b=fSyvCJBTAXTrHc Bdof+pcPRwxaBovrSyFKAAotFf736lNZ0bqiGrt3HgWovDGKC9TLJLeBhZ5uBqKdmhDA3r9UcHPSu bVH9cWv+DbXfICAXPP+hOLo5Jv26RBNf5yv1JbEdP8cT5tQSA/kULsCzvyG5PtOL0w4eBtAZm8Far OQ0Q+XhM9r8ZcYoevtDIJ3o0iLoH7UYLl7lLmAauSVaxkYsgsjNjz2++rwcfppxW9waHUJpiZUhzF lMAVnNGBMB66SsZpBwWY07Behi50zJiDKPHGrhqG1BGGrhHkkNCrMDAPK7MbGhJ9QNwM4reytmqgU UL8a7obZEonTm/9MdhHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1df3hL-0002xX-LL; Tue, 08 Aug 2017 12:33:23 +0000 Received: from mail-by2nam03on0089.outbound.protection.outlook.com ([104.47.42.89] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1df3YI-0003yo-EL for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 12:24:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bWYhB+v2N5bFordzip08nHRNi9nPND6hJSmtxO5G8U8=; b=Wae1+twLZ8u34pG2QtoXQxi7rW+HZ6w0AIM4psSACy/23aUD35z5wTR2t7gAQeCmdjfmRiUy4mWcfIiZa5fFTtcGIIky3+EMlta/R2jLndWevoMadtzBMB0dN3cApE+yLDtDrNa07B01j9bHLrD8MQ70X0tWUc14X31c09sLQIw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; Received: from rric.localdomain (78.55.120.224) by CY1PR07MB2346.namprd07.prod.outlook.com (10.166.194.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Tue, 8 Aug 2017 12:23:34 +0000 From: Robert Richter <rrichter@cavium.com> To: Thomas Gleixner <tglx@linutronix.de>, Jason Cooper <jason@lakedaemon.net>, Marc Zyngier <marc.zyngier@arm.com> Subject: [PATCH v3 5/8] irqchip/gic-v3-its: Prevent its init ordering dependencies Date: Tue, 8 Aug 2017 14:22:55 +0200 Message-Id: <20170808122259.6299-6-rrichter@cavium.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170808122259.6299-1-rrichter@cavium.com> References: <20170808122259.6299-1-rrichter@cavium.com> MIME-Version: 1.0 X-Originating-IP: [78.55.120.224] X-ClientProxiedBy: AM5PR06CA0030.eurprd06.prod.outlook.com (10.167.168.43) To CY1PR07MB2346.namprd07.prod.outlook.com (10.166.194.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c482163c-ad94-4c28-8e5a-08d4de584a98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR07MB2346; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2346; 3:Hi17q8skZ21bgaaCFm/hBr5odBjeQfqHETMJhJ6qdM5EYtBDVPE809IZfHFAuTufbsjKpuJEPX6v2YYOGazoXIomxZIqHDRaIVDGmHY9vBXHU1I4xS8yFteF3ZzIvmTsnoke8+Ar7pWc2qmRWACGr91E5rIe5FQKbQHSeFLrzufprfKtdfVpHTACcy9a12soLmgqf7jmIDY3lzslcJ33QBQa/CocUYAWZFayzqX30yipX4lyBJ1Y16rb7n5StiV7; 25:V1B53oHRtE10yZ9jmiwHp2cQ1iqNYSVbTA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74MP4GZXS4YEio7NnvB8la4MuJubdVEZmLjiY+EgDujPlYfTUScN; 4:Gs4OE4Gj9xP9KCaPneQFHGsXLNfaN3km2bxwDR8aNlv8ymii4awGD0lpwRj2oz1OaNH5mwunpzOXZOxZ9R7RHLE5tBgyiMSEcuPc4SGykPFdmKrFNMBXlruELYQ6FvZQ2FwTnoyj99VdSx0xq6jXJbWHag5Qwv496Zhsodie/4HT7Fc2z460aTfTMSV0fzeY5sOZkrAaF8vu2b+A1VUU2yqn+2O6nKO61V8gLKlDoBNRqr/Ne1MnM+Is54ne60r5 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <CY1PR07MB2346EED8F5F899B03DFA9A38F18A0@CY1PR07MB2346.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB2346; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB2346; X-Forefront-PRVS: 03932714EB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39840400002)(39410400002)(39850400002)(39400400002)(39450400003)(199003)(189002)(33646002)(66066001)(106356001)(68736007)(2950100002)(189998001)(54906002)(6116002)(3846002)(97736004)(72206003)(6666003)(81166006)(50226002)(6486002)(25786009)(5003940100001)(107886003)(38730400002)(4326008)(305945005)(50986999)(101416001)(5660300001)(42186005)(81156014)(230783001)(2906002)(7736002)(6512007)(36756003)(76176999)(1076002)(105586002)(7350300001)(6506006)(48376002)(47776003)(478600001)(53936002)(50466002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2346; H:rric.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2346; 23:2tf6fQB2IsW9G1DAi4uwJtzwKQ7ePRr1eOZmuL8J7?= =?us-ascii?Q?ZHkf3uyWZWsD/GEGhuud09quvanCaHTV5CpgokOFFAZxOSPJiq6RcRBWBKnA?= =?us-ascii?Q?SlhryQoKk82qVpO7JVFnkfByWxt990HJyZE7RIKKpNTfBjQAPFBileur4AAf?= =?us-ascii?Q?jcfPVJvs6/v8Uwm4DRgsyUSlFsMtYf5Rdxm99BN4nJCOOwe//rpy0i3nEup8?= =?us-ascii?Q?+hmA8xdjWEOzjzl2q5eKyNf5Zx1lXSGE0bs+VUxEhwdlc4IlUkVog+555Uh8?= =?us-ascii?Q?o/OZW8IKXoAB7RZT0MFH5WmSkMn3yem33RbCi3HxR+KaQKRrgamc1Us/uWpI?= =?us-ascii?Q?r8xIVAYDVn2PN2BHBc55rvpkw0v2yp5LggEin9jlxMNKpft4EPdDGCBV+rF6?= =?us-ascii?Q?WhL/iSPFUXtUaA2Lm9hyxMaUTCaTidsCJz7Z90jk7zkzVZpP1Sx6xqLZPOCu?= =?us-ascii?Q?3u/QoYhy9asc8SfjaR0hkOuAHZPYjwxHU0Ga35HcmyslitItfwEk9M2+S6db?= =?us-ascii?Q?kOFgwTU4VguEXWrspLdSMswXTRDfm5OwLFTU+MnLK/1GQQe4NjLrxQ50mw5u?= =?us-ascii?Q?Jr+bVaufomXWOlTccQ4TfLgINv2LINitmUgn4t7Vcdd9Lr2Rg2BGOPX50BNN?= =?us-ascii?Q?IiJgD2BXAkQXAHMXLsdy1evjHOswOyt+fLSod28Bp+uajq9ZavQ83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dYkCc3czR5tQX5WFajuGQ2LqenEniRbIdp9LthX9olzwcZKsBTK+hezrUtEuNVyuA==; 5:X2i+KkN7lvpVFoRmedlCVlhsmeosqE4JhGz6o9KzjYk6BtXmwPGnFyWwIxi//TisBu4z3HZwqmRD0EDDtc+60NMej8GpCfTibGD5vPi1lTCpaE6DIqqHUiKVJVm4YU/Z9D36w8fBYpTbEAvo/jEPHw==; 24:Hxz+dr4gp2+uUXMTtsKYwEDMSOYdbWCjy/BhciOqNOImnIx9rdRmF6Ow/u5FznoJYBs26IogkFijpEtBuiKSJPZMiWNRc15EIK5ambVMd0Y=; 7:7VJtd0pPAhtRKFDFk4oyoQYpQoxOrEWYahq9uGF/oof28pHpGf42FGHx/4pGgd6wzlZFvSg8fEh8QUvtZoVDEoeJQmhl6I91FsVKVxt02nU+Ofli5hvnkTVfY+rpU1G3WkGOw87B8gqNFDWR9tXiyBoSTdAokes2ez5QGsxiClPQEHLub116dkZmwLkgPdydCMgoWsIoM1L1VgYonkJjmoW/+/dTyeBB00M9ed0uXJM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2017 12:23:34.0769 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2346 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170808_052403_173442_DC696320 X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Robert Richter <rrichter@cavium.com>, linux-arm-kernel@lists.infradead.org, Shanker Donthineni <shankerd@codeaurora.org>, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c index 5940fdf0036e..7a8fbb74f2eb 100644 --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c @@ -72,6 +72,8 @@ static int its_pci_msi_prepare(struct irq_domain *domain, struct device *dev, return -EINVAL; msi_info = msi_get_domain_info(domain->parent); + if (!msi_info) + return -ENODEV; pdev = to_pci_dev(dev); /* @@ -112,7 +114,7 @@ static int __init its_pci_msi_init_one(struct fwnode_handle *handle, struct irq_domain *parent; parent = irq_find_matching_fwnode(handle, DOMAIN_BUS_NEXUS); - if (!parent || !msi_get_domain_info(parent)) { + if (!parent) { pr_err("%s: Unable to locate ITS domain\n", name); return -ENXIO; } diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchip/irq-gic-v3-its-platform-msi.c index 6ebc871ac63f..999d3bdc17a6 100644 --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c @@ -61,6 +61,8 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev, int ret; msi_info = msi_get_domain_info(domain->parent); + if (!msi_info) + return -ENODEV; if (dev->of_node) ret = of_pmsi_get_dev_id(domain, dev, &dev_id); @@ -97,7 +99,7 @@ static int __init its_pmsi_init_one(struct fwnode_handle *fwnode, struct irq_domain *parent; parent = irq_find_matching_fwnode(fwnode, DOMAIN_BUS_NEXUS); - if (!parent || !msi_get_domain_info(parent)) { + if (!parent) { pr_err("%s: unable to locate ITS domain\n", name); return -ENXIO; }
Right now its_init() must be called before pci and platform init. Remove ordering dependencies to allow all initialization functions being called with the same initcall type. Signed-off-by: Robert Richter <rrichter@cavium.com> --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 4 +++- drivers/irqchip/irq-gic-v3-its-platform-msi.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)