All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: maz@kernel.org
Cc: devicetree@vger.kernel.org, robh+dt@kernel.org,
	mail@birger-koblitz.de, bert@biot.com, john@phrozen.org,
	linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: Re: [RFC PATCH v1 3/4] dt-bindings: interrupt-controller: realtek,rtl-intc: replace irq mapping
Date: Mon, 27 Dec 2021 10:15:41 +0000	[thread overview]
Message-ID: <ofvekt.r4rr67.2rw3hx-qmf@polaris.svanheule.net> (raw)
In-Reply-To: <87v8zaz7ml.wl-maz@kernel.org>

Hi Marc,

On Monday, 27 December 2021, Marc Zyngier wrote:
> On Thu, 23 Dec 2021 19:29:23 +0000,
> Sander Vanheule <sander@svanheule.net> wrote:
> > 
> > On Thu, 2021-12-23 at 18:00 +0000, Marc Zyngier wrote:
> > > On Thu, 23 Dec 2021 12:08:33 +0000,
> > > Sander Vanheule <sander@svanheule.net> wrote:
> > > > 
> > > > The binding incorrectly specified the "interrupt-map" property should be
> > > > used, although the use is non-standard. A quirk had to be introduced in
> > > > commit de4adddcbcc2 ("of/irq: Add a quirk for controllers with their own
> > > > definition of interrupt-map") to allow the driver to function again.
> > > 
> > > That's too late. We have released a kernel with this binding, and it
> > > will live on forever until we totally remove the platform from the
> > > tree.
> > > 
> > > DT is an ABI, and only time travel can fix this blunder.
> > 
> > Taking into account your comments on the previous patch, this change
> > wouldn't even be required if I correct the mappings for my
> > devices. But that wouldn't get rid of the assumed mapping between
> > output lines and parent interrupts.
> 
> A driver can always ignore some information from the DT and do its own
> thing. No sure if that addresses your problem though.
> 
> > 
> > To what extent can the binding be updated to get rid of this
> > assumption? Or would that require a completely new binding?
> 
> You can only extend a binding in a two-way fashion: old kernel works
> with new DT, new kernel works old DT. Which means that in practice,
> you can only *add* information to the DT, and have reasonable defaults
> in the driver when you don't find it.

Thanks for clarifying. In that case I don't think it is possible to get rid of the output-to-parent assumption entirely, since the driver would always need to accommodate for the original binding, where there is no output mapping specified in the binding. There are no SoC-specific compatibles (where a mapping could be assumed), and I don't know on how many MIPS platforms Realtek has used this interrupt router/controller.

I don't have much time anymore today, but I'll break my head over it again tomorrow.

Best,
Sander

  reply	other threads:[~2021-12-27 10:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 12:08 [RFC PATCH v1 0/4] Rework realtek-rtl IRQ driver Sander Vanheule
2021-12-23 12:08 ` [RFC PATCH v1 1/4] irqchip: realtek-rtl: map control data to virq Sander Vanheule
2021-12-23 12:08 ` [RFC PATCH v1 2/4] irqchip: realtek-rtl: use per-parent irq handling Sander Vanheule
2021-12-23 17:57   ` Marc Zyngier
2021-12-23 19:17     ` Sander Vanheule
2021-12-23 12:08 ` [RFC PATCH v1 3/4] dt-bindings: interrupt-controller: realtek,rtl-intc: replace irq mapping Sander Vanheule
2021-12-23 18:00   ` Marc Zyngier
2021-12-23 19:29     ` Sander Vanheule
2021-12-27 10:04       ` Marc Zyngier
2021-12-27 10:15         ` Sander Vanheule [this message]
2021-12-23 12:08 ` [RFC PATCH v1 4/4] irqchip: realtek-rtl: replace custom interrupt-map Sander Vanheule

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=ofvekt.r4rr67.2rw3hx-qmf@polaris.svanheule.net \
    --to=sander@svanheule.net \
    --cc=bert@biot.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.