From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14D57361 for ; Tue, 13 Jun 2023 04:42:53 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-51873e43986so399817a12.2 for ; Mon, 12 Jun 2023 21:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20221208.gappssmtp.com; s=20221208; t=1686631372; x=1689223372; 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=CzwXO5LLinsbc81q9m0mJrThXDrRsGSZgZKBrqcWDhU=; b=Re/JoZDdl7WWFhPNRzXIFIPRLlnyd5pZGoZse5aP6tFTQ1ruH4SblQBU/qotEyJ8+O iMqIDMjO/+jluK8C/6EtzKspe3cTT3unitXHicVeJQf2SUUyk0agBJRXEkoityiA8USl v82m85Hryu0TtYHH2IvWElQGzoJEg1Hu9nIdWCU1jFX2Bahe/MV3MRRvw/Ijm+3gPMB5 oTjOChfwoW7JOm9AYO1Uq0jt6SzTUsTP/bekTVKCXC9wOrzlXcAHZw8HEfWsXmQurh+D 6NBihHB3EucGRXJ+Rsd7kWSihtlrYwnUX7Kmnsaw2UqKgcpvTyaaNakSa1BFWTDPXa4R HabA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686631372; x=1689223372; 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=CzwXO5LLinsbc81q9m0mJrThXDrRsGSZgZKBrqcWDhU=; b=C8zUYvkBT/tm5tIh4jhCdeCpEcQYeLIe4JlEBpPgRVxgJ6YQhVAbwGDKSnQ0Rp2+z8 qzUf4nXfRjNg2wVfIIUswsbOmHXQsRHvabtW6suZ7bGpbu5fBrvKMF46SRZzkRMLKID8 LNZmqyQKSlI5EYxaMFZShoODGEberJPU6qRQNBNZNiSbhdGB1otZ3V/eqzyaWIOuy+pa 6tTj6NkQ9eFnEiLMYhBAob2MqfwKiRAKYIQzzQVF+Pg5ElB/H/EBAazCo15iLLqd67L+ Z5KGMuR1eCCMMZPzqFJyG36Wm/6ftaGzuZUnLhaP0bW9KErfJPuy/2LZrXhyEC/UtMwB ZEAA== X-Gm-Message-State: AC+VfDxm9lBJD6lV6EU/rIfq8TR8IsHYzB6Eddu2CPbCvgFb8Ogw90iM EzwGBYnYZ/7rqHcEivQsxwlrh+t6/t1Z9+Bokj5G5Q== X-Google-Smtp-Source: ACHHUZ4ETr5UZ3VbtqL8LS3ZVa0OXp7qvMh694ytmLxSCEv5jRu14utuMLjd7mOBnSDm2aadOjxLwJ3P3GoNW1vtYdA= X-Received: by 2002:aa7:c553:0:b0:508:3b1f:e6b5 with SMTP id s19-20020aa7c553000000b005083b1fe6b5mr5571374edr.15.1686631371900; Mon, 12 Jun 2023 21:42:51 -0700 (PDT) Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230508142842.854564-1-apatel@ventanamicro.com> <20230508142842.854564-3-apatel@ventanamicro.com> <20230608182828.GA3183987-robh@kernel.org> In-Reply-To: From: Anup Patel Date: Tue, 13 Jun 2023 10:12:40 +0530 Message-ID: Subject: Re: [PATCH v3 02/11] of/irq: Set FWNODE_FLAG_BEST_EFFORT for the interrupt controller DT nodes To: Saravana Kannan Cc: Anup Patel , Rob Herring , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Krzysztof Kozlowski , Robin Murphy , Joerg Roedel , Will Deacon , Frank Rowand , Atish Patra , Andrew Jones , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 10, 2023 at 2:47=E2=80=AFAM Saravana Kannan wrote: > > On Fri, Jun 9, 2023 at 4:40=E2=80=AFAM Anup Patel wrote: > > > > On Fri, Jun 9, 2023 at 1:35=E2=80=AFAM Saravana Kannan wrote: > > > > > > On Thu, Jun 8, 2023 at 11:28=E2=80=AFAM Rob Herring = wrote: > > > > > > > > +Saravana > > > > > > > > On Mon, May 08, 2023 at 07:58:33PM +0530, Anup Patel wrote: > > > > > The RISC-V APLIC interrupt controller driver is a regular platfor= m > > > > > driver so we need to ensure that it is probed as soon as possible= . > > > > > To achieve this, we mark the interrupt controller device nodes wi= th > > > > > FWNODE_FLAG_BEST_EFFORT (just like console DT node). > > > > > > > > > > Fixes: 8f486cab263c ("driver core: fw_devlink: Allow firmware to = mark devices as best effort") > > > > > > > > It is good practice to Cc the commit author of what you are fixing. > > > > > > > > > Signed-off-by: Anup Patel > > > > > --- > > > > > drivers/of/irq.c | 10 ++++++++++ > > > > > 1 file changed, 10 insertions(+) > > > > > > > > > > diff --git a/drivers/of/irq.c b/drivers/of/irq.c > > > > > index 174900072c18..94e1d9245cff 100644 > > > > > --- a/drivers/of/irq.c > > > > > +++ b/drivers/of/irq.c > > > > > @@ -535,6 +535,16 @@ void __init of_irq_init(const struct of_devi= ce_id *matches) > > > > > INIT_LIST_HEAD(&intc_desc_list); > > > > > INIT_LIST_HEAD(&intc_parent_list); > > > > > > > > > > + /* > > > > > + * We need interrupt controller platform drivers to work as= soon > > > > > > > > If it's platform drivers/devices you care about, then perhaps this > > > > should be done when platform devices are created. > > > > > > > > > + * as possible so mark the interrupt controller device node= s with > > > > > + * FWNODE_FLAG_BEST_EFFORT so that fw_delink knows not to d= elay > > > > > + * the probe of the interrupt controller device for supplie= rs > > > > > + * without drivers. > > > > > + */ > > > > > + for_each_node_with_property(np, "interrupt-controller") > > > > > > > > This function only operates on nodes matching 'matches', but this > > > > operates on everything. > > > > > > > > It does make sense that if we init an interrupt controller here, th= en we > > > > will surely want to probe its driver later on. So maybe just move > > > > setting FWNODE_FLAG_BEST_EFFORT within > > > > for_each_matching_node_and_match() below. > > > > > > > > > + np->fwnode.flags |=3D FWNODE_FLAG_BEST_EFFORT; > > > > > + > > > > > > Definite Nack. You are pretty much disabling fw_devlink for all > > > interrupt controllers. There are plenty of examples of the IRQ driver= s > > > being needed very early on and still probing properly without the nee= d > > > for this flag. Please fix your driver/DT. > > > > Okay, I will try to set FWNODE_FLAG_BEST_EFFORT only for > > APLIC device_node via IRQCHIP_DECLARE(). > > No, my point is that you very likely don't need to use that flag. > > What exactly is the problem you are facing? Point to an example RISC-V > dts (not dtsi) in upstream and give specifics please. The APLIC irqchip driver added by this series is a platform driver. It used to work fine without setting FWNODE_FLAG_BEST_EFFORT flag in fwnode but after commit 8f486cab263c the APLIC irqchip driver did not probe hence this fix. Regards, Anup