From patchwork Wed Nov 7 22:03:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 10673117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4089215A6 for ; Wed, 7 Nov 2018 22:03:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30E1C2000A for ; Wed, 7 Nov 2018 22:03:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 246BE2BE72; Wed, 7 Nov 2018 22:03:47 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 771DD2000A for ; Wed, 7 Nov 2018 22:03:46 +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:Content-ID:Message-ID:Date :Subject:To:From:Reply-To:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4z5UN42Zh6/Bd6z5R15Un9doWSS/SGwJeGOANqa1r4I=; b=TNQkfW/tBtwOaK Zsu2pFSa/5x2lB0IuINv/qmMoIVU5muC1JzWCx+nM9cfPSh+7wDJO+hq33Bk5MSxRKhdTzStchXjq FKNZmpOcClbjdsFhNR0jZ9hLGbrcx4+bpdNQhVvKjPwG/gcEWonvr4dpI/X7NHG/XhrboZKgSgwx4 k4M1Kx31ye0MiWVBuUkQpHQDVoMpby0PnOFURI4AZCAbpD07Cyc10PpCEFZqKxiJyuzWAp7LlKlDr UHabbE2w0BXbOGwjyQFJk9QTMRloNgUrlYTHYURsjChQL+Ri9fGws4MKr0QjYkwHKrBUNy1jPOWAy uP9yhbppqhv8gUKImLbA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKVvL-0000zI-CG; Wed, 07 Nov 2018 22:03:43 +0000 Received: from mail-dm3nam05on060f.outbound.protection.outlook.com ([2a01:111:f400:fe51::60f] helo=NAM05-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKVvH-0000xM-Ol for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 22:03:41 +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:X-MS-Exchange-SenderADCheck; bh=Gj2OJSNK0sHNbg4OCqzVmXm3Kz6IBt+4XoFwJlrNrLI=; b=he7QQM14e/rliSGbKhGXotB7/NutTl15gGsBhMVdcAFm302nbJrcOXaplKCX7VEYYXSw2fvede11V5G4I2bR15gx6A4osl4CVkviwCh/5sfdHmnqWwwIQCY1cNu1oDXKDAcYEG0W0suLg5NF9JIN0Z3j8Eb+l1kOvWBQfi+hluQ= Received: from SN6PR07MB5326.namprd07.prod.outlook.com (52.135.105.33) by SN6PR07MB5232.namprd07.prod.outlook.com (52.135.120.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.22; Wed, 7 Nov 2018 22:03:08 +0000 Received: from SN6PR07MB5326.namprd07.prod.outlook.com ([fe80::f0b9:acf9:7513:c149]) by SN6PR07MB5326.namprd07.prod.outlook.com ([fe80::f0b9:acf9:7513:c149%5]) with mapi id 15.20.1294.034; Wed, 7 Nov 2018 22:03:08 +0000 From: Robert Richter To: Marc Zyngier , Thomas Gleixner , Jason Cooper Subject: [PATCH 00/10] irqdomain, gic-v3-its: Implement late irq domain initialization Thread-Topic: [PATCH 00/10] irqdomain, gic-v3-its: Implement late irq domain initialization Thread-Index: AQHUduWqhR5TMbLPo06W2x2cs1kfyA== Date: Wed, 7 Nov 2018 22:03:08 +0000 Message-ID: <20181107220254.6116-1-rrichter@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR03CA0033.eurprd03.prod.outlook.com (2603:10a6:20b::46) To SN6PR07MB5326.namprd07.prod.outlook.com (2603:10b6:805:73::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [77.180.181.154] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5232; 6:0dgk9Y8MGcWRIAzPPIdYXmh/nKtnaeFou0U3bkq++HS24GpzeJWd21rLCHHz9iI3LqTclxdsh8qY1B23BdnbDzAX1CyX41r4TLBcmKScE3cFAVKnW4sEWlyY8lcnCOutOBwdsuRnf8h9oI1zr0Hk9GnbbHA4ih6E3AI3TBFFE/nejCUPR80Mp2LRDsUtvt2qJ8Sl0ODUFnH3FKS5UJQ5LsYeoFLP7aY7DRff9nlodahwZbtledWCjZ5/ecLREYbljS8gER1q0BC3yyuSFEDJoZhtqhwe8B410K1ZNxAg1NBFYku7xYIfZm0TjDVF4ktXx2190o8c/UsPbJHO3RUtD+9zFl2Jn7eAtxfpnOgHcKaB2MOS5S4rKYOH/3MItb2nXR3bF/js9akiPk8CY2Bkm6VLWjW7nbRn2T2hxw/5oG4ITdiUafm5mIYqj5i9zZH1wPFKlONSW2dNOR+Z1D0HHQ==; 5:DFA8ZB9OFhyRFZuVfrnLxDdr3BegOgL5AaGw+AunXMxnkvFnYjfaMaa0efJCjH6cNzjmuc+wrrfu0hoca/d0rT11DWV2wt2S3i6k4jf7EDcPNFSDvZVksAGNYFm+ZrCFHsl1pFyu7jPsP6bFQfkHvLqoh8qFVAnO4sYRR3IEVms=; 7:b/uCCcRQYkNHcM9ynA3TV8MWXQMKvxWNLCPNYMqYLuqcHvy5SF81xQJ4lleM84Tu59yhfZ0NOimRiso2YVzoYscWdxCcknYv35XK3hkepYKqvO65c0W8Sg4C6h9CWyw3+xmBHDzCTCk1MifbaJE2HA== x-ms-office365-filtering-correlation-id: ef39b88f-f016-4122-467c-08d644fcccad x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5232; x-ms-traffictypediagnostic: SN6PR07MB5232: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(269456686620040); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5232; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5232; x-forefront-prvs: 08497C3D99 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(346002)(396003)(376002)(189003)(199004)(71200400001)(7736002)(71190400001)(39060400002)(6486002)(3846002)(66066001)(6436002)(186003)(36756003)(476003)(478600001)(2616005)(53936002)(256004)(14444005)(305945005)(6512007)(54906003)(1076002)(316002)(107886003)(25786009)(110136005)(6116002)(2906002)(97736004)(4326008)(6506007)(386003)(72206003)(105586002)(99286004)(486006)(5660300001)(7416002)(8936002)(102836004)(106356001)(68736007)(8676002)(14454004)(81156014)(81166006)(2900100001)(52116002)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5232; H:SN6PR07MB5326.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 0lPoJvIbedSMMysqo1ED5tGskqOuVHESkMRQkHf32kvptxXZqGTfV/pgSzZ4l1P30ZtUHbXalz8qij4UzLtyvmKHONa6FvZJv084m2bFcvYC9eTI5PDw4O8JFiyNUz/5aMR1tk8J9ceTdjkl1/wmP1whubUoMT4/zYArW/hjj8GU4I4JHnNVnxGQ2nPiu4RRQWdAGHiqFOmkpmacKE8Y+2SfrORqS5NZJkMF193FarTknIc0ryVh/lwvTSsflHAu7b9f9aANArizisVHEIEzgzI3AhSDBPQwsZLtJgYhwrOERNQ05VnCcZ/k8ev7+UJcFl4N2CId7BTfMlz7gNC+cN56tbBRQTB4QPOjQ61G0Rs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <21CBAC707956A148BC25A9A8D2AE151F@namprd07.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef39b88f-f016-4122-467c-08d644fcccad X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2018 22:03:08.2573 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5232 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181107_140339_807931_25FD9707 X-CRM114-Status: GOOD ( 14.92 ) 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: Lorenzo Pieralisi , Stuart Yoder , Will Deacon , "linux-kernel@vger.kernel.org" , "Richter, Robert" , Matthias Brugger , "linux-arm-kernel@lists.infradead.org" , Laurentiu Tudor 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 This patch series is a rework of the gic-v3-its initialization. It is in preparation of a further series that uses CMA memory allocation for ITS tables. For this the CMA framework must be available and thus ITS needs to be initialized after the arch_initcalls. This requires two major reworks. First we must remove all irq domain init order dependencies (patches #1-#5), second the ITS initialization must be split into an early probe and a later init part (patches #6-#10). Patch #1 introduces a new interface to request an irq domain, see the patch description for details. In patches #2-#5 all ITS related irq domains are converted to use the new interface. There are no order dependencies for parent and client irq domain initialization anymore which allows us to initialize all ITS irq domains in the same initcall (moving to the later subsys_initcall). Note that I do not have fsl hardware available, the code should work, but is only carefully reviewed and compile tested, please test on that hardware. The remaining patches #6-#10 are an incremental rework of the ITS initialization, basically splitting probe and init (patch #7) and separating it from gic-v3 code (patch #8). Patches #9 and #10 change initcall levels for various drivers. Patches have been tested with Cavium ThunderX and ThunderX2. I have an implementation of CMA ITS table allocation on top of this series available, I will send out patches for this in a couple of days. Robert Richter (10): irqdomain: Add interface to request an irq domain irqchip/gic-v3-its-platform-msi: Remove domain init order dependencies irqchip/irq-gic-v3-its-pci-msi: Remove domain init order dependencies irqchip/irq-gic-v3-its-fsl-mc-msi: Remove domain init order dependencies fsl-mc/dprc-driver: Remove domain init order dependencies irqchip/gic-v3-its: Initialize its nodes in probe order irqchip/gic-v3-its: Split probing from its node initialization irqchip/gic-v3-its: Decouple its initialization from gic irqchip/gic-v3-its: Initialize its nodes later irqchip/gic-v3-its: Initialize MSIs with subsys_initcalls drivers/bus/fsl-mc/dprc-driver.c | 41 +++++++ drivers/bus/fsl-mc/fsl-mc-msi.c | 6 +- drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 49 +++++--- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 68 ++++++----- drivers/irqchip/irq-gic-v3-its-platform-msi.c | 56 ++++++--- drivers/irqchip/irq-gic-v3-its.c | 160 +++++++++++++++++--------- drivers/irqchip/irq-gic-v3.c | 12 +- include/linux/cpuhotplug.h | 1 + include/linux/irqchip/arm-gic-v3.h | 5 +- include/linux/irqdomain.h | 15 +++ kernel/irq/irqdomain.c | 158 +++++++++++++++++++++++++ 11 files changed, 441 insertions(+), 130 deletions(-)