From patchwork Wed Nov 28 14:43:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 10702803 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 B294913BB for ; Wed, 28 Nov 2018 14:46:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F3092D59F for ; Wed, 28 Nov 2018 14:46:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9383E2D59B; Wed, 28 Nov 2018 14:46:30 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 2D53F2D596 for ; Wed, 28 Nov 2018 14:46:30 +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:In-Reply-To:References: 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=3/KZWCQzyGy0uSxEACrDIHO78YMFLFF5jNUOxAWMF98=; b=ZREvWFFg6poGIa FFNnI5uZpSMcednl5j3UtoixcEmWbGuDljX6q08DAEMO2664z318tEglE6EryV4DgEji1u1YJ4/BW m68bqZKanOgttuJ5SJSIALwJOtBqgU/OFx0AHjjhFlbW+tr2ZXUuKkIE9ouHQwN7vJtnVySjPvif3 kq6XdMu4DkohpJVLtKDTccBsE85jF11Drq2/x5w7xoePdS5TtFQbZuph0LvvQvwBmP3XXHV6xJu+M 07WU3Mq1OV3RR7FPVPIZQdsFnUvHOJUXrHB5Y02mI8sLPVDhb1F5vYkIEhS3oFE+XltOBzdaePZLg 71NASpNtPvBWVqT7em3Q==; 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 1gS16e-0006k1-3P; Wed, 28 Nov 2018 14:46:24 +0000 Received: from mail-co1nam03on0621.outbound.protection.outlook.com ([2a01:111:f400:fe48::621] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS14s-00043q-8o for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 14:45:12 +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=63O86WtqYE4lfiBL34hoKJ5lQTXr+NwWTlJyCQ0B74g=; b=ch5I9NfNI4Qp6EqHN3eu4WExmWnDSfLr7+Mm1m/ECUo+Z7MNtcrA/UA2JLkEy4JBrXnef0wXqo+AnJz5miXDoEUdqUzT51/8tBDt0wt2QHfPQNVUAjMZQVNkNkPX5+J5o4/W8SCYTMaELLmj5wZb+5GvFEVLMTu+/kUKgDOTL/g= Received: from SN6PR07MB5326.namprd07.prod.outlook.com (52.135.105.33) by SN6PR07MB4399.namprd07.prod.outlook.com (52.135.91.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.18; Wed, 28 Nov 2018 14:43:34 +0000 Received: from SN6PR07MB5326.namprd07.prod.outlook.com ([fe80::ccc7:d111:7f3d:667d]) by SN6PR07MB5326.namprd07.prod.outlook.com ([fe80::ccc7:d111:7f3d:667d%4]) with mapi id 15.20.1361.018; Wed, 28 Nov 2018 14:43:34 +0000 From: Robert Richter To: Marc Zyngier , Thomas Gleixner , Jason Cooper Subject: [PATCH v2 09/10] irqchip/gic-v3-its: Initialize its nodes later Thread-Topic: [PATCH v2 09/10] irqchip/gic-v3-its: Initialize its nodes later Thread-Index: AQHUhyi9TwLQwwjV3kulXsTCwl2DVQ== Date: Wed, 28 Nov 2018 14:43:34 +0000 Message-ID: <20181128144240.28727-10-rrichter@cavium.com> References: <20181128144240.28727-1-rrichter@cavium.com> In-Reply-To: <20181128144240.28727-1-rrichter@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P194CA0042.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::19) 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.14.124.106] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB4399; 6:LEjV5XVjaLHgXXI7h/WpMFJYTIbQwyboHHQFvWN/0NqgxdgJ/VdFM8DZ3fiFJUqokRHOi9B5yj1PDyx74SYCjTgK5fbeg8ABTXEV/N7Jv44gkjW1czJVMtLQDa4uy1uQB0zYguD3vUbdI7KDDbSlgRIuI8vWLmS3Yi4IxYPpL37b8oa8p+vxAwurlFj+HOD1FH8gcM5ZWGz2WKxlYrXXBypF16hx/KnzkUoxMm4JkXVVbGsn8ld24O9rrI4IubHCgArcf4djupAVyc0aQWVIQskElNokaNaZE1e6kCpiSnFpRLjiaMw6LEKpY0GwEAxP0VjAgi9qnI83rxqthALV2I5MGjqLwSoUl5kBXAuK3WPHkpXKjxr6uGY/aCE/jWQp/m1DKi5xD/ciV17RfOMz/zseKzNcHGFtTe6BacHSPPaqZjbqpUPI4tFxJYRjq4fqEHrZW/rFVRkge+9bamFAeg==; 5:s1Z9Jl9I63O9PmoERAMq8udJ3xZXMJ5f4ZgSNB4MUOC1y/yK8DJ0R2um48DbeVU4bWQG1HcBJjfMX6d0D+YSVDCOjCD8+HlL6nyDOnugN9ggBcSGzVPM2uvl7RkXgBdEULVD+zLe3rdqdfXrqNI077wIprtwCVL3U3rpIe3Lruc=; 7:tYGW8zJUgcFzNjcz/G+JGF/VH5c6UyYI5FOxMF3nMBzFUBiz+UgXJt4OY8FzpVkymegD6ydjNW13FoFxFH++bITC9W3d2ZaWpWWJWy7tBPw/WxcpLiMUBcUp2jLkS5i9L15/6/fz+hvBKa1dPXvkpQ== x-ms-office365-filtering-correlation-id: 37d52c40-3946-477e-3f8b-08d6553fdf77 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4399; x-ms-traffictypediagnostic: SN6PR07MB4399: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231443)(999002)(944501410)(52105112)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB4399; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4399; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(39860400002)(136003)(199004)(189003)(97736004)(256004)(105586002)(4326008)(106356001)(81156014)(8936002)(66066001)(2906002)(54906003)(110136005)(71190400001)(81166006)(6486002)(316002)(14454004)(8676002)(39060400002)(36756003)(76176011)(52116002)(68736007)(186003)(6116002)(7416002)(25786009)(71200400001)(53936002)(478600001)(99286004)(6512007)(446003)(11346002)(6436002)(26005)(305945005)(486006)(7736002)(102836004)(72206003)(3846002)(2616005)(6506007)(5660300001)(386003)(476003)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4399; H:SN6PR07MB5326.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: BfkcZ4HF3C1nxX9OgM6MjGORyeb462OfezeBAlfuGwAPZQ/IW2HkgSiqnGsTUrsAkK8xdkLRuXy4OOva2H/rsZmqCQAfqjK1x7thvkjRpDcDzJWCWS5dX34VKyfga6aCKEbMGnooPC+wLLYgmEZd0Zk6R6vLH6CZj3+aF5MXDQjaWrkW4Ry6aKCGfp0m93f7YDfX9mQlIEmICcCN1WUU8qbb6WsXhdgUrV9WShOAryQPwDkZ6LLI6g11rbbQOnhQ38QkB2kIchF0qjao6FnUeiCia1F/aZiCAdFnsSEvFG58t0rD+16UE2eqMFJsHstk3WoJ176G/dYfrEnaqtHC9YBpTPM7GPpJKkNe8KZ7njw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37d52c40-3946-477e-3f8b-08d6553fdf77 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 14:43:34.3219 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4399 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_064434_726973_93D8DDAA X-CRM114-Status: GOOD ( 13.09 ) 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 , Julien Thierry , 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 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 | 4 ---- include/linux/irqchip/arm-gic-v3.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index fd8561fcfdf3..13cf56c66483 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3920,7 +3920,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; bool has_v4 = false; @@ -3982,3 +3982,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 d2942efdb6d5..01538876ad15 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1323,8 +1323,6 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare if (static_branch_likely(&supports_deactivate_key)) gic_of_setup_kvm_info(node); - its_init(); - return 0; out_unmap_rdist: @@ -1628,8 +1626,6 @@ gic_acpi_init(struct acpi_subtable_header *header, const unsigned long end) if (static_branch_likely(&supports_deactivate_key)) 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 f4348fa4260a..885d5a4e239a 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -604,7 +604,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); int mbi_init(struct fwnode_handle *fwnode, struct irq_domain *parent); static inline bool gic_enable_sre(void)