All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>,
	devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Birger Koblitz <mail@birger-koblitz.de>,
	Bert Vermeulen <bert@biot.com>, John Crispin <john@phrozen.org>,
	linux-kernel@vger.kernel.org,
	Sander Vanheule <sander@svanheule.net>
Subject: [RFC PATCH v1 0/4] Rework realtek-rtl IRQ driver
Date: Thu, 23 Dec 2021 13:08:30 +0100	[thread overview]
Message-ID: <cover.1640261161.git.sander@svanheule.net> (raw)

After seeing some use and with more devices tested, the current implementation
for the Realtek SoC interrupt controller was found to contain a few flaws.

The driver requires the following fixes:
- irq_domain_ops::map should map the virq, not the hwirq
- routing has an off-by-one error. Values (1..6) correspond to MIPS CAUSEF(2..7)

The following improvements should also be made:
- Use N real cascaded interrupts with an interrupt-specific mask of child irq lines.
  Otherwise a high-priority interrupt may cause a low-priority interrupt to be
  handled first.
- Get rid of custom interrupt-map interpretation, replace by realtek,interrupt-routing.

These patches are some initial changes, and since is this my first real work on
an interrupt driver, I'm submitting this as an RFC first. Please see the notes
on the patches for some extra remarks.

I've also currently opted to stay with cascased interrupts, as I'm not
sure if (and how) this should be implemented as a hierarchical
controller.

Best,
Sander

Sander Vanheule (4):
  irqchip: realtek-rtl: map control data to virq
  irqchip: realtek-rtl: use per-parent irq handling
  dt-bindings: interrupt-controller: realtek,rtl-intc: replace irq
    mapping
  irqchip: realtek-rtl: replace custom interrupt-map

 .../realtek,rtl-intc.yaml                     |  49 +++--
 drivers/irqchip/irq-realtek-rtl.c             | 202 +++++++++++-------
 2 files changed, 163 insertions(+), 88 deletions(-)

-- 
2.33.1


             reply	other threads:[~2021-12-23 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 12:08 Sander Vanheule [this message]
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
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=cover.1640261161.git.sander@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.