Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbdCFOnS (ORCPT ); Mon, 6 Mar 2017 09:43:18 -0500 Received: from mail-dm3nam03on0075.outbound.protection.outlook.com ([104.47.41.75]:7344 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754708AbdCFOm0 (ORCPT ); Mon, 6 Mar 2017 09:42:26 -0500 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=cavium.com; From: Robert Richter To: Marc Zyngier Cc: Thomas Gleixner , Jason Cooper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Richter Subject: [PATCH v2 6/8] irqchip/gic-v3-its: Initialize its nodes later Date: Mon, 6 Mar 2017 13:57:37 +0100 Message-Id: <20170306125739.19445-7-rrichter@cavium.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170306125739.19445-1-rrichter@cavium.com> References: <20170306125739.19445-1-rrichter@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [92.224.60.20] X-ClientProxiedBy: VI1PR0501CA0018.eurprd05.prod.outlook.com (10.172.9.156) To SN1PR07MB2351.namprd07.prod.outlook.com (10.169.127.17) X-MS-Office365-Filtering-Correlation-Id: b02e6730-23a7-4c18-0eaf-08d464908385 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2351; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2351;3:JWM0j3K7ygmN+Ev9BpravTwG1HM9IExvMk8A7apkZYmhvSVkSB0f+QVACuB20uSgTtmW+BCJ9JcDWaTseBj/icqFZ/BePzhC0GoEOyyNOAxhY2uG4aISMXo9Pdt1opnMM7z1b7e6eLPaRFEUJ2SJKcNqftvLzJfpzmellGhHmC0vVPRbi0ZVEzUwMvnFF2Z/HCkE8ISutoDbrltQ4TJKqTJR4wpHPaT5XeMeavK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JimShc+kMRNDyoRWs7q14B4VcRA1Ex790KAaN9PPBnH51PJqGBXP3yXtZfuA8HTNSxeWG6IqSYfXwvD/yPOCvh1pW2dIqXgPvYjY7x/ztQVSomncJq8sWQy6Wf/xjkDyiZ0W3SLUKw2f6+fJ/EORhvCZQhPvlT71/GcGTayBJY3oW3A8HxLRMJh+lRiH7WCOuonUowhEPyRPXbcm9FeX72cbd8mJZqQ0ymyJqVTUmdPCzmZD2Dm562zGM0O 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)(3002001)(10201501046)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558025)(20161123560025)(6072148);SRVR:SN1PR07MB2351;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2351; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2351;4:Rw3L5xtH3r3bgjuPvDQREYAfjwYT4wbI9rW/UJ6dG8HqDckWs995ZoVbVF3XIqiOrH+Jxs9JuFNJM9GPcdw2+aGfApVlFUe+1UDQffWzAJEv69EfuPPwoQOl6hDhSMRZ7E61zOWWCJPHjxNX5Excj0zmz3h746ERAth02AGuXDeOXds1w9591NC+WZlMzDSjijAyx0iWqAs0ziMJr75YCSJwbVixm+Tu+J9uI8z2pI84oARtAzAbkmGU2VofxEM1TV6isugNLBb7XjxzHn8lvWkvMAnIxeTyjXgNNB2rd2iaGpJSgCqsr+tdfPLy5+TalFgAZv/NMw6gakrkNJofydPV2vhEQhb69QR0bTIxap3Z3owPhnCKaPCXIwLiXCpBYFC4n7QRHaYKQNd2l47jZGbSm1jE8PJ/eEiiUZCziBC8zSx2LZBDhZK9t6CWKX67TdGK2dBTIzyq9IWOW4ccnfZ9B0IyReisSbAkCoBcVYQLr1huiFQU+DuLzRewenHqLUipaQE//WkhI+/6+A5gqLC1TTtUa1LqOaOVLyEy/17E6V1kgVReI0rupsHmFkRu/GoY8WHD5uw0MmfrahIT88bWRloNtVWt4jPiJmLHldE= X-Forefront-PRVS: 0238AEEDB0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(6116002)(3846002)(2906002)(76176999)(7736002)(1076002)(47776003)(5003940100001)(6506006)(25786008)(6486002)(66066001)(92566002)(5660300001)(305945005)(4326008)(33646002)(50986999)(81166006)(50226002)(230783001)(6916009)(48376002)(42186005)(53936002)(54906002)(6512007)(50466002)(189998001)(575784001)(36756003)(38730400002)(110136004)(8676002)(2950100002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2351;H:rric.localdomain;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR07MB2351;23:UDnqqyAFJS0DtXk38k7ki8RAcJvmdHS/rsckfo5dw?= =?us-ascii?Q?2AhvN/p0q22nhSjud23N0vrCpxNXnWz8gZX/aJlTvnj4ubNup7afDvMlzt/+?= =?us-ascii?Q?xDw8E/W+1qY5Gl3FBt61TQtw2ZEt9nG8B+CBGZ/icPuoDvDb9FjdWWgrozGc?= =?us-ascii?Q?s6rfF9VuE7VwILaGnla25vJAAJ5ZlU1zIyirtmMTFLeXqVfAkbW0mKZZ6ylq?= =?us-ascii?Q?TrDvRnJhP/zvg/gBBsn5VIUkyXb5BBYc2QxLWbUs+jGGkUOEKXuTaFF2y4VB?= =?us-ascii?Q?h1Sq/kn1ItLNhsDSz6jWClcXU2q8PhlXHxzXV90U7w12RjAfNF3QehgRP2y1?= =?us-ascii?Q?GpncuB7TNmFIU5HhJ9vDxPGgGy2PYau36+Z1cudcPG8skxl+koMTDnWhqO6X?= =?us-ascii?Q?INNDw+6nHGy8FL6UCZrJ3sPt1fydc1/9hxi9KyXmWR1YVYXSokw3HemPeLQM?= =?us-ascii?Q?Ksxi4dLS3TTrvLa6WIA5MOdyJ68M+3UM7+A0iqNIy4EOno+3rHU21WUuD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Pq3mJWf2orKXshntg/frM/792Mz3TojiEjzsftu6yHBG0YOGKGopv9oXQYRUMsAGn3pwM9VA2BvgBPAzMBDZ6kNZ540VQJ/4FSBYaVpI3pGrWv48ACOGbWrF5e5x5g==;24:93C4wlr5z0cT47uG0/FStaSwhfuRwt/cm/fYQclmlRnwlpYOH4b95CtjIQU2Cr12XWYbTKdLe4M0p/0Pjenh9N3rpDV1/ABGDyNCy9g2K88= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2351;7:dqZk/IcwpZEkQJomzX8GWhvjcch/TgZfzGQST3t7kAZVBhXT/H1dfb3tTG6V7+g3rasv8XXb32Jzrg3V1SaDZTgClTnx30kedXWeBfxYG/uoliOmiLoUIJka7S++iIQ9d4go5vt6xq1n5Xd30VOjcOfaD3x1Sudjv2TwnosUzabSvU5oWXtTwVTQFs5XuPXem2HD70E2zfKpHBDVpslAyurYLvwOivWpHdlvisxue6LErqwxuB8KYLOgEnpNFPU3joW721BOfSdS+TBDzIdds5eznIwdBv9lQqXH8viUmbp689o8DyEP1yQSeOEmZkDn2sFo6+T+LhJFh+WGBs8dyA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2017 12:58:39.7248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2351 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 8badc230af4b..c0eaae35c631 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1902,7 +1902,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; @@ -1943,3 +1943,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 2b9be256a9ec..69da7c1ccbf2 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1164,9 +1164,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: @@ -1456,8 +1453,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 bf256ce1715d..41b7a5e96b80 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -467,7 +467,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