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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31943E71D27 for ; Fri, 29 Sep 2023 12:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbjI2MdB (ORCPT ); Fri, 29 Sep 2023 08:33:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232977AbjI2MdA (ORCPT ); Fri, 29 Sep 2023 08:33:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B55C61A4 for ; Fri, 29 Sep 2023 05:32:57 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FFC7C433C8; Fri, 29 Sep 2023 12:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695990777; bh=1Bo4FZNzqybjVrw58i9A7aUqAJ5AK5epSxmtyX6LO3Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mp8Om77UtnPoeFBHs1iuvcmOn5u/zQUtgAuCvlYumujvVwP2RZcByMalV6vzeqcF2 sekzx0/SBomc+dE8UGDCskzK+T7mlg3E0ADdcesQ9614e+9E+3d3oLUfJrOvxXhHEW gFvnmmvXClzQachJhaTCix4fUI1M1IILaIIol6Vh27M4jPZelGWeXLOWelMhmZRLw4 K77zZQWETq88pE3D5oIyVAPlVHF8r2lErC4XVdw5QOHGtL3E92PcH0iSrn3eDGeWRQ WCJWDP5dLFDW9V5t6exraTcT6Oo6/do3Xob9Sl40rMe7eT2mRweWrmSRBIpL3+fUvc bDcIlOEiK8Vag== Received: from [85.255.233.37] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qmCfu-00HFD4-CN; Fri, 29 Sep 2023 13:32:54 +0100 Date: Fri, 29 Sep 2023 13:32:52 +0100 Message-ID: <87bkdlma6j.wl-maz@kernel.org> From: Marc Zyngier To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v9 05/15] irqchip/sifive-plic: Convert PLIC driver into a platform driver In-Reply-To: <20230928061207.1841513-6-apatel@ventanamicro.com> References: <20230928061207.1841513-1-apatel@ventanamicro.com> <20230928061207.1841513-6-apatel@ventanamicro.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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 85.255.233.37 X-SA-Exim-Rcpt-To: apatel@ventanamicro.com, palmer@dabbelt.com, paul.walmsley@sifive.com, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, frowand.list@gmail.com, conor+dt@kernel.org, atishp@atishpatra.org, ajones@ventanamicro.com, sunilvl@ventanamicro.com, saravanak@google.com, anup@brainfault.org, linux-riscv@lists.infradead.org, linux-kernel@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Sep 2023 07:11:57 +0100, Anup Patel wrote: > > The PLIC driver does not require very early initialization so let > us convert it into a platform driver. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > As part of the conversion, the PLIC probing undergoes the following > changes: > 1. Use dev_info(), dev_err() and dev_warn() instead of pr_info(), > pr_err() and pr_warn() > 2. Use devm_xyz() APIs wherever applicable > 3. PLIC is now probed after CPUs are brought-up so we have to > setup cpuhp state after context handler of all online CPUs > are initialized otherwise we see crash on multi-socket systems > > Signed-off-by: Anup Patel > --- > drivers/irqchip/irq-sifive-plic.c | 242 +++++++++++++++++++----------- > 1 file changed, 154 insertions(+), 88 deletions(-) > [...] > +core_initcall(plic_init); Or not. There are only two choices: either you absolutely require early init, and you stick with the current situation, or you don't, and you can rely on dependencies. I'm not prepared to have a third option. M. -- Without deviation from the norm, progress is not possible.