devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Saravana Kannan <saravanak@google.com>,
	Anup Patel <apatel@ventanamicro.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Atish Patra <atishp@atishpatra.org>,
	Andrew Jones <ajones@ventanamicro.com>,
	Sunil V L <sunilvl@ventanamicro.com>,
	Conor Dooley <conor@kernel.org>, Anup Patel <anup@brainfault.org>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 7/9] irqchip: Add RISC-V advanced PLIC driver
Date: Fri, 14 Jul 2023 10:01:04 +0100	[thread overview]
Message-ID: <86jzv2vpdb.wl-maz@kernel.org> (raw)
In-Reply-To: <CAGETcx8kH8cJVdhcv5K4qNUo58godFZEBnOfTGKUUQ6VuUguvQ@mail.gmail.com>

Anup,

On Fri, 14 Jul 2023 00:56:22 +0100,
Saravana Kannan <saravanak@google.com> wrote:
> 
> On Mon, Jul 10, 2023 at 2:44 AM Anup Patel <apatel@ventanamicro.com> wrote:
> >
> > The RISC-V advanced interrupt architecture (AIA) specification defines
> > a new interrupt controller for managing wired interrupts on a RISC-V
> > platform. This new interrupt controller is referred to as advanced
> > platform-level interrupt controller (APLIC) which can forward wired
> > interrupts to CPUs (or HARTs) as local interrupts OR as message
> > signaled interrupts.
> > (For more details refer https://github.com/riscv/riscv-aia)
> >
> > This patch adds an irqchip driver for RISC-V APLIC found on RISC-V
> > platforms.
> >
> > Signed-off-by: Anup Patel <apatel@ventanamicro.com>

[...]

> > +static int __init aplic_dt_init(struct device_node *node,
> > +                               struct device_node *parent)
> > +{
> > +       /*
> > +        * The APLIC platform driver needs to be probed early
> > +        * so for device tree:
> > +        *
> > +        * 1) Set the FWNODE_FLAG_BEST_EFFORT flag in fwnode which
> > +        *    provides a hint to the device driver core to probe the
> > +        *    platform driver early.
> > +        * 2) Clear the OF_POPULATED flag in device_node because
> > +        *    of_irq_init() sets it which prevents creation of
> > +        *    platform device.
> > +        */
> > +       node->fwnode.flags |= FWNODE_FLAG_BEST_EFFORT;
> 
> Please stop spamming us with broken patches. Already told you this is
> not an option.
> 
> Nack.

What puzzles me here is that *no other arch* requires this sort of
hack. What is so special about the APLIC that it requires it? I see
nothing in this patch that even hints at it, despite the "discussion"
in the last round.

The rules are simple:

- either the APLIC is so fundamental to the system that it has to be
  initialised super early, much like the GIC on arm64, at which point
  it cannot be a platform device, and the story is pretty simple.

- or it isn't that fundamental, and it can be probed as a platform
  device using the dependency infrastructure that is already used by
  multiple other interrupt controller drivers, without any need to
  mess with internal flags. Again, this should be simple enough.

If these rules don't apply to your stuff, please explain what is so
different. And I mean actually explain the issue. Which isn't telling
us "it doesn't work without it". Because as things stand, there is no
way I will even consider taking this ugly mix of probing methods.

In any case, reposting the same stuff ad nauseam is only going to
result in this series being ignored, which I don't think is what you
want.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2023-07-14  9:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  9:43 [PATCH v5 0/9] Linux RISC-V AIA Support Anup Patel
2023-07-10  9:43 ` [PATCH v5 1/9] RISC-V: Add riscv_fw_parent_hartid() function Anup Patel
2023-07-11 13:26   ` Andrew Jones
2023-07-17  5:04     ` Anup Patel
2023-07-10  9:43 ` [PATCH v5 2/9] irqchip/riscv-intc: Add support for RISC-V AIA Anup Patel
2023-07-11 14:12   ` Andrew Jones
2023-07-17  6:38     ` Anup Patel
2023-07-10  9:43 ` [PATCH v5 3/9] dt-bindings: interrupt-controller: Add RISC-V incoming MSI controller Anup Patel
2023-07-10  9:43 ` [PATCH v5 4/9] irqchip: Add RISC-V incoming MSI controller driver Anup Patel
2023-07-10  9:43 ` [PATCH v5 5/9] irqchip/riscv-imsic: Add support for PCI MSI irqdomain Anup Patel
2023-07-10  9:43 ` [PATCH v5 6/9] dt-bindings: interrupt-controller: Add RISC-V advanced PLIC Anup Patel
2023-07-10  9:43 ` [PATCH v5 7/9] irqchip: Add RISC-V advanced PLIC driver Anup Patel
2023-07-13 23:56   ` Saravana Kannan
2023-07-14  9:01     ` Marc Zyngier [this message]
2023-07-14  9:35       ` Anup Patel
2023-07-14 13:35         ` Marc Zyngier
2023-07-14 14:05           ` Anup Patel
2023-07-17  8:05             ` Marc Zyngier
2023-07-17  9:05               ` Anup Patel
2023-07-17  9:36                 ` Anup Patel
2023-07-17  9:48                 ` Marc Zyngier
2023-07-10  9:43 ` [PATCH v5 8/9] RISC-V: Select APLIC and IMSIC drivers Anup Patel
2023-07-10  9:43 ` [PATCH v5 9/9] MAINTAINERS: Add entry for RISC-V AIA drivers Anup Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86jzv2vpdb.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=ajones@ventanamicro.com \
    --cc=anup@brainfault.org \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@atishpatra.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=saravanak@google.com \
    --cc=sunilvl@ventanamicro.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).