Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1514586rdb; Mon, 2 Oct 2023 11:54:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQiIbVookeLQz3XzTvxjcqYjm/5l7O/jg1PpsYh8BoEiVQrD80k7/JB4/lU9bXwV0kQWl2 X-Received: by 2002:a05:6358:718:b0:144:9cef:cd28 with SMTP id e24-20020a056358071800b001449cefcd28mr12978815rwj.7.1696272861210; Mon, 02 Oct 2023 11:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696272861; cv=none; d=google.com; s=arc-20160816; b=UsHklHrjez18pneJ03YkBj8upWBbssAfXUpjscbegICHIEjW03rD1a3ctV4yIIClnA ReAPhpCOswqnXUi3rMutXb9iA5ESRkYH+t+GD2pQBmVA/tAfJXJ39MUUgvEm0XZtEL9i tsQVL/mSb+ZUiM/V1kNwp+qF48DqA3DFrbvNSdBi/Mxz/GXB4+jdf7+S29sahZnnzNwW UliqVjOZEU+vg+3Eb1owA+UTVO1N9WHl3E4sCQ6TulxbkgIgeqRIFtn4hJXDL9FocKXH 4Trusmpjz8ZG9ptCXwsGzWk5O9QyI7+lsAv7fg1fVMh684NBZfAhF6/ypSm7PF6O3q5S Mh6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Xw7QdnIT6pMfMgjKXoJDij3f+XvSgPQK38vQOQ+QTs8=; fh=YxbeDLxTMAYlTbKbKCWMHNly/9LgXX8nhueUC8qDsy4=; b=he45rlmjF8r5JfJ9SeioyWVh3pMokjQSy2NQJ8NGatUyMIgPsWhRlb3YswNltfkVMv 3u30rLksA4aKXCzuqYBQz9Z9gLspcIK+87LkbLotpGs6idT3hj3SCkVax0wi9oQ+XwSK GEYUf2DWuLdkOMRgpJYfYZiCwStbm6cquCpj1qD3dfE5tKAEHfncY7VPEjA3r1td5hl7 70rqE8jX0275H8HosqpI0pjSCGqUuRQlaUKgV6DNjeUsOr+JO3UMFELMdKVD/xAA+E3R EFHJPar/PLpj/pQvqNx4lMBTHaN3PxG/1zPq6Sn0zcehBES3aAviCS6BxaEiRSHMj0iB OMAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=klPhw9Bm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id r14-20020a63440e000000b0056fbf85c743si27086925pga.790.2023.10.02.11.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=klPhw9Bm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 39C1982289A4; Mon, 2 Oct 2023 08:18:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238029AbjJBPSa (ORCPT + 99 others); Mon, 2 Oct 2023 11:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237823AbjJBPS3 (ORCPT ); Mon, 2 Oct 2023 11:18:29 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4F3B3 for ; Mon, 2 Oct 2023 08:18:25 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2773af0c5dbso9336636a91.1 for ; Mon, 02 Oct 2023 08:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1696259905; x=1696864705; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xw7QdnIT6pMfMgjKXoJDij3f+XvSgPQK38vQOQ+QTs8=; b=klPhw9Bm8vgVDO0dWydxfcKwpHtRbEtdcRCfn8x3FWlrl3sbC+MdEkaQMKd6aebPyK FQBs1fmvKiKrWUKmEAc/X9kkNO9cfq5a2IDy2NcgsXiAqwA1CNYzGkokkQB5xd9h5ESR DA5pgj+AM6rgb+t4dbtWyh7gFKXYKCHqjvy+xFGi5UZnU9XoECWmuUuxtNDi/ntSNfJD JqbMPQvq3ZvlQL3lUgyUZzx9psED8LJnGKTg3p2KOnuXLETVkiBDsgJDnLuaOEfLgk9o R6Q+EVXlaoibexbOKsrz1bH1nKas4mJ1UBgZmU378U4Rp41MaE0xWPSA7SiP+k3+UfDB C7Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696259905; x=1696864705; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xw7QdnIT6pMfMgjKXoJDij3f+XvSgPQK38vQOQ+QTs8=; b=D/7iYtX1wOdKnFf53Mm+EAPwDD8aFndE9Ux62Ec2pUSQftVkxlEWk6rHUDt6kSRpst 2Qvk3/Lkgs3WFcj5wQFKq0PWgLzD7bUNdEd4sZuxYW2y+X0ExTlBNQRBew638kaNQSHy Fyz0clcSYuiAZImszYCVeGvUSR4BSWQcSO0oo4iUtlH6+SvXTgT2d9vOAP1m+8gnljYq tVshCTDWJTXqursvKMZnVnxvSr/xg6cUwpQG04og/0terVHCeqvCBsC61gqQ9V19Fszz 7kQarto/jJp+cFBpfLvCjpfdAaXWIMEZni4VcnQ0TLavc/UvyAVYAnVt+WSV2K7F6Laa CrAw== X-Gm-Message-State: AOJu0YzwYxdvQHAg8TnUmdjfUbFuFWzTBK1k1g6cJ2quk9+Fh7/VAofY y/WcttfAw3R72yio2LzQvBCTBi4OulqMgf3jbCSPdA== X-Received: by 2002:a17:90a:5ac6:b0:268:93d:b936 with SMTP id n64-20020a17090a5ac600b00268093db936mr8611041pji.18.1696259904904; Mon, 02 Oct 2023 08:18:24 -0700 (PDT) MIME-Version: 1.0 References: <20230928061207.1841513-1-apatel@ventanamicro.com> <20230928061207.1841513-6-apatel@ventanamicro.com> <87bkdlma6j.wl-maz@kernel.org> In-Reply-To: <87bkdlma6j.wl-maz@kernel.org> From: Anup Patel Date: Mon, 2 Oct 2023 20:48:12 +0530 Message-ID: Subject: Re: [PATCH v9 05/15] irqchip/sifive-plic: Convert PLIC driver into a platform driver To: Marc Zyngier 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 08:18:41 -0700 (PDT) On Fri, Sep 29, 2023 at 6:02=E2=80=AFPM Marc Zyngier wrote= : > > 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. This is not required for DT based platform driver probing so I will use builtin_platform_driver() over here and in APLIC as well as IMSIC platform drivers. Regards, Anup > > M. > > -- > Without deviation from the norm, progress is not possible.