From: "tip-bot2 for Akshat Singh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Akshat Singh <automobilehacks@gmail.com>,
Thomas Gleixner <tglx@kernel.org>,
Caleb James DeLisle <cjd@cjdns.fr>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/econet-en751221: Chain the handler to all parent interrupts
Date: Tue, 01 Dec 2026 09:15:12 -0000 [thread overview]
Message-ID: <179611651247.1190409.8134644087862228113.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20261115-en751221-intc-all-lines-v1-2-dc03a40f47f0@gmail.com>
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 79c94a0c661ceadfa44ad7df29edd50536325364
Gitweb: https://git.kernel.org/tip/79c94a0c661ceadfa44ad7df29edd50536325364
Author: Akshat Singh <automobilehacks@gmail.com>
AuthorDate: Sun, 15 Nov 2026 19:26:02
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 01 Dec 2026 10:10:44 +01:00
irqchip/econet-en751221: Chain the handler to all parent interrupts
The EN751221 interrupt controller does not drive one CPU interrupt line
per source. It presents the number of the pending interrupt plus one, in
binary, on the CPU interrupt lines IP2-IP7. In VEIC mode the CPU takes
that number as the vector, but without VEIC the driver chains its handler
to the first parent interrupt only, IP2 in the existing device trees. An
odd-numbered interrupt then never interrupts the CPU by itself: it is
handled only when an even-numbered one happens to run the handler, which
on an idle system is the next timer interrupt. That covers the frame
engine's QDMA (21), xHCI (17) and the first PCIe port (23).
On a Nokia G-140W-C, whose 34Kc does not report VEIC, this delayed
received packets by up to 10 ms, and ping round-trip times to the device
cycled through 1-11 ms.
Without VEIC, chain the handler to every parent interrupt listed in the
device tree. One interrupt usually raises several lines, so the later
runs of the handler find nothing pending; don't count those as spurious.
VEIC mode is unchanged.
Signed-off-by: Akshat Singh <automobilehacks@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://patch.msgid.link/20261115-en751221-intc-all-lines-v1-2-dc03a40f47f0@gmail.com
---
drivers/irqchip/irq-econet-en751221.c | 33 +++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-econet-en751221.c b/drivers/irqchip/irq-econet-en751221.c
index 3372676..6449c7c 100644
--- a/drivers/irqchip/irq-econet-en751221.c
+++ b/drivers/irqchip/irq-econet-en751221.c
@@ -18,6 +18,15 @@
* When VPE#1 requests IRQ 30, the driver manipulates the mask bit for IRQ 29,
* telling the hardware to mask VPE#1's view of IRQ 30.
*
+ * The controller does not give each source its own CPU interrupt line. It
+ * presents the number of the pending interrupt plus one, in binary, on the
+ * CPU interrupt lines IP2-IP7, which a CPU in VEIC mode takes as the vector.
+ * Without VEIC, IRQ 21, for example, shows up as 22 = 0b010110 on IP3, IP4
+ * and IP6, so the controller is chained to every CPU line listed in its
+ * "interrupts" property. Chained to IP2 alone, it would see the odd-numbered
+ * IRQs only when an even-numbered one, such as the timer, happened to run
+ * the handler.
+ *
* Copyright (C) 2025 Caleb James DeLisle <cjd@cjdns.fr>
*/
@@ -145,9 +154,12 @@ static void econet_intc_from_parent(struct irq_desc *desc)
pending0 = ioread32(econet_intc.membase + REG_PENDING0);
pending1 = ioread32(econet_intc.membase + REG_PENDING1);
- if (unlikely(!(pending0 | pending1))) {
- spurious_interrupt();
- } else {
+ /*
+ * An interrupt usually raises several CPU lines. It is handled when
+ * the first of them runs this function, and the others find nothing
+ * pending.
+ */
+ if (pending0 | pending1) {
domain = irq_desc_get_handler_data(desc);
econet_intc_handle_pending(domain, pending0, 0);
econet_intc_handle_pending(domain, pending1, 32);
@@ -459,7 +471,22 @@ static int __init econet_intc_of_init(struct device_node *node, struct device_no
if (ret)
return ret;
} else {
+ int nr_parents = of_irq_count(node);
+
irq_set_chained_handler_and_data(irq, econet_intc_from_parent, domain);
+
+ for (int i = 1; i < nr_parents; i++) {
+ int parent = irq_of_parse_and_map(node, i);
+
+ if (!parent) {
+ pr_warn("%pOF: DT: Failed to get IRQ %d from 'interrupts'\n",
+ node, i);
+ continue;
+ }
+
+ irq_set_chained_handler_and_data(parent, econet_intc_from_parent,
+ domain);
+ }
}
econet_intc.domain = domain;
next prev parent reply other threads:[~2026-12-01 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 19:26 [PATCH 0/3] irqchip/econet-en751221: Deliver odd interrupts without VEIC Akshat Singh via B4 Relay
2026-11-15 19:26 ` [PATCH 1/3] dt-bindings: interrupt-controller: econet,en751221-intc: Allow up to 6 parent interrupts Akshat Singh via B4 Relay
2026-12-01 9:15 ` [tip: irq/drivers] " tip-bot2 for Akshat Singh
2026-11-15 19:26 ` [PATCH 2/3] irqchip/econet-en751221: Chain the handler to all " Akshat Singh via B4 Relay
2026-11-17 11:09 ` Caleb James DeLisle
2026-12-01 9:15 ` tip-bot2 for Akshat Singh [this message]
2026-11-15 19:26 ` [PATCH 3/3] mips: dts: Connect the EcoNet EN751221 intc to IP2-IP6 Akshat Singh via B4 Relay
2026-12-01 9:15 ` [tip: irq/drivers] " tip-bot2 for Akshat Singh
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=179611651247.1190409.8134644087862228113.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=automobilehacks@gmail.com \
--cc=cjd@cjdns.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®