From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8040BC433EF for ; Tue, 28 Sep 2021 08:12:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4699F611C3 for ; Tue, 28 Sep 2021 08:12:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4699F611C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6Jx9CwHmfeedSdyJgK4rXasJ/SgqR+1wmVDuJzj3Iz4=; b=0hst8M5JA0dAWZ Awi7eR+DfDp/Fn/8fIV1Tn+wdl+oo/IeFH0VTM2N96HoJC+/2BCURPVoKht4hLSr8N1Ymo0ksWgK2 et5t8mTnYpb3gLSH7frYXbxKTE/Ss0jEktIIshpnbNKDvZTCop94UEMHP2XvzM6yP5OcS4d59DKJq NQZEj+pr8AYd02DYLgG4fMKH37uflMBzM/b4VXlAM1017Hb6wTx9Z8ipZf4EIsovGUkoXBwGNd+3s NL3KYK5FYIWpoMjCKqu0qhY0geld18PJtPNayEqdDbEsU75qMd8l299ieXeLZDk3lWS9KvVDUdIZ8 ogU0TSxaD+hXCH7a7dBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV8CM-006DrA-Rv; Tue, 28 Sep 2021 08:10:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV8CF-006Dn5-0N for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 08:10:43 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD42560F9B; Tue, 28 Sep 2021 08:10:37 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mV8CB-00DRl2-M2; Tue, 28 Sep 2021 09:10:35 +0100 Date: Tue, 28 Sep 2021 09:10:34 +0100 Message-ID: <87pmstt91h.wl-maz@kernel.org> From: Marc Zyngier To: Florian Fainelli Cc: Rob Herring , "linux-kernel@vger.kernel.org" , Russell King , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , Catalin Marinas , Will Deacon , Yoshinori Sato , Rich Felker , Thomas Gleixner , Frank Rowand , Ard Biesheuvel , Mike Rapoport , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Arnd Bergmann , Guenter Roeck , Kefeng Wang , Mark Rutland , Andrey Konovalov , Anshuman Khandual , Valentin Schneider , Ingo Molnar , Peter Zijlstra , "moderated list:ARM PORT" , "open list:SUPERH" , "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" Subject: Re: [PATCH 07/11] of/irq: Export of_irq_count to drivers In-Reply-To: References: <20210924170546.805663-1-f.fainelli@gmail.com> <20210924170546.805663-8-f.fainelli@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: f.fainelli@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, catalin.marinas@arm.com, will@kernel.org, ysato@users.sourceforge.jp, dalias@libc.org, tglx@linutronix.de, frowand.list@gmail.com, ardb@kernel.org, rppt@kernel.org, linus.walleij@linaro.org, akpm@linux-foundation.org, geert+renesas@glider.be, arnd@arndb.de, linux@roeck-us.net, wangkefeng.wang@huawei.com, mark.rutland@arm.com, andreyknvl@gmail.com, anshuman.khandual@arm.com, valentin.schneider@arm.com, mingo@kernel.org, peterz@infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, linux-mips@vger.kernel.org, devicetree@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_011039_159865_AD6B4ADC X-CRM114-Status: GOOD ( 31.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 27 Sep 2021 20:49:46 +0100, Florian Fainelli wrote: > > On 9/27/21 12:43 PM, Rob Herring wrote: > > On Mon, Sep 27, 2021 at 2:28 PM Florian Fainelli wrote: > >> > >> On 9/27/21 12:08 PM, Rob Herring wrote: > >>> On Fri, Sep 24, 2021 at 12:07 PM Florian Fainelli wrote: > >>>> > >>>> In order to build drivers/irqchip/irq-bcm7120-l2.c as a module, we will > >>>> need to have of_irq_count() exported to modules. > >>>> > >>>> Signed-off-by: Florian Fainelli > >>>> --- > >>>> drivers/of/irq.c | 1 + > >>>> 1 file changed, 1 insertion(+) > >>>> > >>>> diff --git a/drivers/of/irq.c b/drivers/of/irq.c > >>>> index 352e14b007e7..949b9d1f8729 100644 > >>>> --- a/drivers/of/irq.c > >>>> +++ b/drivers/of/irq.c > >>>> @@ -440,6 +440,7 @@ int of_irq_count(struct device_node *dev) > >>>> > >>>> return nr; > >>>> } > >>>> +EXPORT_SYMBOL_GPL(of_irq_count); > >>> > >>> Please convert to use platform_irq_count() instead. > >> > >> That requires a platform_device to be passed to platform_irq_count(), > >> will that work even when the drivers remain built into the kernel and > >> get initialized early on? > > > > No, does your irqchip using this do both? Looks to me like it is > > always a platform_device. > > On ARM/ARM64 not using GKI as well as MIPS, we would want the module to > be built into the kernel image, however when using GKI that driver would > become a module. How do you suggest reconciling both usages? I don't see what GKI has to do with anything. Either the driver can be built as a module (and it is in this case a platform device at all times, built-in or not), or it cannot, and it falls into the IRQCHIP_DECLARE() category (and there is no export problem). Pick your poison! Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel