From patchwork Wed Feb 1 17:38:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 9550437 Return-Path: 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 A770460424 for ; Wed, 1 Feb 2017 17:52:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 988C928427 for ; Wed, 1 Feb 2017 17:52:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C5C228442; Wed, 1 Feb 2017 17:52:26 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no 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 27D8B28427 for ; Wed, 1 Feb 2017 17:52:26 +0000 (UTC) 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 1cYz4z-0002tB-Pw; Wed, 01 Feb 2017 17:52:25 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYz4q-0002KW-Bk for linux-arm-kernel@bombadil.infradead.org; Wed, 01 Feb 2017 17:52:16 +0000 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYyss-0001Pl-1l for linux-arm-kernel@lists.infradead.org; Wed, 01 Feb 2017 17:39:55 +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=10iIMerScZEP0cL3sO45TzZWuElr8qvzP6vQ0tAOWik=; b=DosbA1DlSkPvgRPMDueMKpCqPqx+NS3+YlzdrndmzPyBp2UpupH5gPIdTPkFzMAhau/n3ZFqELW0+XHdmc/MD3ZuyPLrQcvowCrToVOTQXGP96zckqQq7WgzdgHXHo0JYZmEUe21NAB2sPNmRciXpOTo0bH6CAy7fHXlX8RoZd0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; Received: from rric.localdomain (92.229.95.220) by BY2PR07MB2343.namprd07.prod.outlook.com (10.166.114.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 1 Feb 2017 17:39:16 +0000 From: Robert Richter To: Marc Zyngier Subject: [PATCH 6/9] irqchip/gic-v3-its: Prevent its init ordering dependencies Date: Wed, 1 Feb 2017 18:38:30 +0100 Message-ID: <20170201173833.12630-7-rrichter@cavium.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170201173833.12630-1-rrichter@cavium.com> References: <20170201173833.12630-1-rrichter@cavium.com> MIME-Version: 1.0 X-Originating-IP: [92.229.95.220] X-ClientProxiedBy: DB6PR1001CA0017.EURPRD10.PROD.OUTLOOK.COM (10.171.79.27) To BY2PR07MB2343.namprd07.prod.outlook.com (10.166.114.145) X-MS-Office365-Filtering-Correlation-Id: e72c3cec-1229-498c-53a5-08d44ac93f3f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR07MB2343; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 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3FzRiPv62ALdl8vKePK0O1TcG+YhOmidvThkcDf/rTQ3gl/sSIBXjhpK6+2Xebq6hb0y6gJCcGMjKPgZBlgxI2bRc20Api7UNuwegpM8jsUAMyS774OAnhHUrhtAMx0qSRInQ/8hKfk2gLC0NiTAwi6ZHt4Aij+slQA6ddOZDjkXlSBSZOHlMTEWP4+wC2ZbjJgCHCrAznO3RrftHe19aDKGltXm1cpzHpSFFVxF4lXxhaR25hfqtaj9VvugJwwglxeAvOj4Mq0/d8kFlDyc7sqbDXQyXuQFf4ZQNlo6qEl83hgtu81PHhx3/sLiIAdTr46XpXaV/4GgGvdeUMQYLbVqCeXr56LMFgdmAJUZGXTjtVW6vFF1yJl387xZUoAr/EvnLN5HkuLKeBXmrmUoQullV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123558025)(20161123562025)(6072148); SRVR:BY2PR07MB2343; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2343; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 4:PxoOW01QCyvbn9dwvpMgWrht1lkEFPr1LJicJNJtYp+teua3XN+WAtXlODl1YqaebFv8bHHZQIT3eWXY1y/8V+BdkbsifsV0QBkUWdl0gXss078ENq97YQxcIodkpH0UqPOC2IQ60i1wLw1rkXvppNFb2c8UqIakiw2gYRLkKsw2HotdqPCIDVZ2paLPnonCaVLToruHYdqAShvHWDQD7aJMjXQxAMKi0Efe7joHm4oFvVfFtcWIDMSg8oZiadBcCh7HdHHbuIJJ89iwjHrLNHD4Js9nVtXFuaGzi5OBuzlPaQN+YziL7EHHzw1gmPmQ2MEcdKlXCiyeq6kVn/Ln4Agr49bcMcPxs+tFDo0KfWlVnZg36K07+Yg88RFgpwdZwLuEOb6OS9Ej3WVQg38z/fiDLpnYPMsH9iVEbxFYfpC6Vtfz8exkAH+fGL0+/qH86nawziv//dgNw78ELWYaMT/dDs2r03gfT0qOvlQMKHvRBvDEQler20fC9mbtNK1/R9HeGUIM5Zy4+qvddNXhbyto4/qPSusNZS4rNNqqb/d4n/uXgTxFMBR5rK7nUx/9pqcllBOKHOSiuXHHw+md11NjSQIdUcwUz7SxIeXZCjA= X-Forefront-PRVS: 0205EDCD76 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(81156014)(81166006)(189998001)(5660300001)(110136003)(97736004)(6916009)(2950100002)(50226002)(6666003)(230783001)(106356001)(105586002)(101416001)(42186005)(66066001)(8676002)(33646002)(47776003)(305945005)(7736002)(38730400001)(6506006)(6486002)(76176999)(68736007)(6512007)(53936002)(54906002)(5003940100001)(25786008)(1076002)(3846002)(6116002)(2906002)(4326007)(48376002)(50466002)(92566002)(50986999)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB2343; 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; BY2PR07MB2343; 23:3hZMlJa2rO4UOlhaUHD2L1TJwmoNPOvPh5MBai0Xl?= =?us-ascii?Q?DyAftld2kS/NJR8buBw05V9L+GvhZNArTuf2km4RotgjRW8JefcBC/X2EgqF?= =?us-ascii?Q?+8YYXzwaE07sgIHcU+IHoFgOYvvMRUeN5dJheSejsJ7lBaX82La52lDN/gq4?= =?us-ascii?Q?HDwR7umuj0P2biL62YbeoXst3mi2eH21C216g/HOGOfvnZx2RoXVuKtrXrGf?= =?us-ascii?Q?5x83Gr9D9+NhEs7hcL+kceCEGvoez3f7B2tIGeShWDsCSPXYF1QlVCirWJsi?= =?us-ascii?Q?QEgLr1PxEU+tEl8F/SIyzGCzXturthf9jQQv3Xt35Urv2b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9I21OoBjH/p8Vzc00W+CP3lTUjq0yGWyVrXXPhocMSywsZ+PTr7O/hQaKgwM68fhoKCAVu5OVsVFCYSlmFDniUc3mChYL+96RRpH1z+tZIMSx9T4LJITDbGHrmLSL7PdOuHERu3838KejIXtjxk/PURdc4Z4tVELtrNfVV9Y6D1DDjfxJRNDJk/YDLe2H23UYGPrNqWmM99ghqkw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2017 17:39:16.0566 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2343 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170201_173954_231154_D4531A2B X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robert Richter , Thomas Gleixner , Jason Cooper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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(-) diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c index dace9bc4ef8d..afe78f224181 100644 --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c @@ -77,6 +77,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); dev_alias.pdev = pdev; @@ -113,7 +115,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 7d8c19973766..22ba1dfed8ba 100644 --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c @@ -32,6 +32,8 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev, int ret, index = 0; msi_info = msi_get_domain_info(domain->parent); + if (!msi_info) + return -ENODEV; /* Suck the DeviceID out of the msi-parent property */ do { @@ -84,7 +86,7 @@ static int __init its_pmsi_init(void) continue; parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS); - if (!parent || !msi_get_domain_info(parent)) { + if (!parent) { pr_err("%s: unable to locate ITS domain\n", np->full_name); continue;