Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752273AbdHHMYs (ORCPT ); Tue, 8 Aug 2017 08:24:48 -0400 Received: from mail-by2nam03on0076.outbound.protection.outlook.com ([104.47.42.76]:19840 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752432AbdHHMXj (ORCPT ); Tue, 8 Aug 2017 08:23:39 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; From: Robert Richter To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Shanker Donthineni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Richter Subject: [PATCH v3 6/8] irqchip/gic-v3-its: Initialize its nodes later Date: Tue, 8 Aug 2017 14:22:56 +0200 Message-Id: <20170808122259.6299-7-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 Content-Type: text/plain 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: 6ad3bcbd-715c-442c-08ae-08d4de584c35 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:WsQxQqddVIlXcOF1NS1zL84Whof2XkHGTVETgBi8n3PkzgZ55eWsLZiC8Kz0Mh1DL8wsXNAIgBXY2XbZh1NE0zGzmKBweHrYe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+hdAfFBv4xhLq9MSv2pJVyU1X1ulawUyFp0zqyg+E/ipKqRQBLr3yp38rix0rgy4EZ5cQtMkRiL3z2t0KVfLqYXTGjYOn4t3KdkezSRQxw4Xa/GNJh+K4AMC5Z9duViTne7rFVEVbTGSqLiBPg7hF3mHR7ICidhuJfrvApD9lw1JZ0vvRNiwQLqftSaV5DDmbeA1kHLkTwm9PPWW6fV6rkhBEnEZkt0FZZTtZ+U3eF;4:8stfcFv+G741O/ruMry3gaCup4uO8VAChKTT77l3Hneuu3UWFzX6wBVMZOnY7BAh7i/VPSPVh4OweZcAuVf0b1kUzgSvHU7xG8dHgLL9xX8LW3+6g90ZXIyqe+Uslc4EXye/9Ss0PU7gB3qUNL4BdpcILcOcaQROHTaQEH0O3//kPgZ8CUDLeQe9kvG/VAb7Z6kydewh3SGzZVHGXIUShiSdh6Lbk/+jeLgapVWXBTNpvhGW6m9NBvvnv9MPlFT2 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: 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; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2346;23:GaNxsMxSv7ZGZ5Lr8EmIVPQ9wdpg4lodFEA0KFw+0?= =?us-ascii?Q?T0NhYJLKVLhRpob5lNE48V9p3MvZ99f06m4ofIxBcAuEYTa+LH/jm8UTM+xV?= =?us-ascii?Q?wGFLUBkSXnhujmBamj1fxjKg/YfZPQp6Pa8eI0+zIZQW7yIjb7a4/iN7R6gV?= =?us-ascii?Q?rH73Tj77vH44LgHIpl0L37sGzUF1nY2zpViFKN+Es73e/QST+VZwL/xw87LU?= =?us-ascii?Q?Z51vavZ/YfipA9kdBdWGStTmWcFM0KoJkkKWlfJDfHU4NofNFSEx95F5yhcX?= =?us-ascii?Q?g/8Mg1CQGoXYxNEtCxjfmCzQ7UOTM0Y4WFbj1xF/U0YtAILour6JXPsYM+KG?= =?us-ascii?Q?T5yeBQR/n/6hY05dNPW2OWhLcKhBL+QqTO18Z0gEJNwnqjhF809Y092Wp3am?= =?us-ascii?Q?FhZqRmHiU+vJpW82SmsPyAgSgd+deiGCxKzCcR+JeK/drI2GTVO7dWDGa3nD?= =?us-ascii?Q?ZIOdO5xdedCuP1lD9L9A01DXMnir8UIvBzF4h23X+LtPoGOj0V5ZrixsUH6o?= =?us-ascii?Q?WgIe7VR9V7FUBh5WcPSf0cGamQF8i5o3IADApU8a6hZ5SjB1hkNGds12UhxT?= =?us-ascii?Q?pMag6+NuWG4j40dt7FETn6CPAtH3yBmdQFr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zNsg9bw6wNPW0hUBp72X4+ajVGm0gOpugw+d/C05NRdq1Oc0/sXN4/iLbXt/4P8VCMPZmCGvRGRgryaeDMYiBlH9ztR8zM+s62IKzqsUMj3bd4f/16MJ30XPLCpZVSp39Dpq7xhol/AQ4FOHdUucG+7rkzg==;5:AXQT56+hVBn7orC/FZTNJNYcE4TKUXsmk6S1iNsZxPB6KKJH4NxUCqeaNTK78B0TRA4u6ihqkR+PJr05J62HM+EbXsB8h/5HO3vTmmmzp3j8xKGIL9VomKp/Gb02p1EgRtWzqN+/9jkCZNOFDFdpqw==;24:Tpp0czz/pkS+MXRotVzvZw+jhNlL5/6JPI2SY6K/qEGPFj+q5oo2wNDDo30ZMh6pWVeR0+SGmbCIiRh+gO3omnar4ofkzDW9AocW14aiw5Y=;7:aTeGdgHMaCtY0edhr1rW/uKdzQtRKwB9IgGiG+0WhUt7Z1cRopWxh+UkBr7o3tIQj+a9t8bYpzrHIte0mdqC16X2zZlzS0OO8cn0Wp26cVwiIpC1syTGQ6vgbwDGHadNuLY5p8FDUrKKsi+g/auep5Brue+tLTm5s4+JDB73UqfJYTz6D5EDQa1ktdlzxm3jf3JK618oP88qcEi2w7KHYr6h8QBjrWgmjlueAddCgiM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2017 12:23:36.7645 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2346 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2143 Lines: 68 Use an initcall to initialize its. This allows us to use the device framework during initialization that is up at this point. We use subsys_initcall() here since we need the arch to be initialized first. It is before pci and platform device probe where devices are bound to msi interrupts. Signed-off-by: Robert Richter --- drivers/irqchip/irq-gic-v3-its.c | 3 ++- drivers/irqchip/irq-gic-v3.c | 5 ----- include/linux/irqchip/arm-gic-v3.h | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 5e2d4f2876d8..488f811d5978 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1994,7 +1994,7 @@ int __init its_probe(struct fwnode_handle *handle, struct rdists *rdists, return 0; } -int __init its_init(void) +static int __init its_init(void) { struct its_node *its, *tmp; int err = 0, err2; @@ -2036,3 +2036,4 @@ int __init its_init(void) return 0; } +subsys_initcall(its_init); diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 1476ce12b3b8..32bdfd656ea7 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1167,9 +1167,6 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare gic_populate_ppi_partitions(node); gic_of_setup_kvm_info(node); - - its_init(); - return 0; out_unmap_rdist: @@ -1459,8 +1456,6 @@ gic_acpi_init(struct acpi_subtable_header *header, const unsigned long end) acpi_set_irq_model(ACPI_IRQ_MODEL_GIC, domain_handle); gic_acpi_setup_kvm_info(); - its_init(); - return 0; out_fwhandle_free: diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 15cbedbd82f1..3c375c593800 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -493,7 +493,6 @@ struct irq_domain; struct fwnode_handle; int its_probe(struct fwnode_handle *handle, struct rdists *rdists, struct irq_domain *domain); -int its_init(void); static inline bool gic_enable_sre(void) { -- 2.11.0