From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796116516; b=MR+lRBKeZJmo1+jh2FSKLfQUoVW+h/FQHs+GAyl+pcX1jo55ok+cTuEcu1KYLjaEel+C eDmDPO4nmpJq+AEj6sJcK/yzmPo0pw8o2LqwT+k0/AXc9Gacel4PLuxFFJXGkcfTud7gO iB/uOrMGZwRJOOdp9JGMwuNEUgY69ZHoQTgPgFdVTvRxvsRcEFfJ/Wqu6ud4XJblHPNee vtjh4O/MlOzMDxvLyudQResEYQEouc5t32oWD/YsbJWP8q/IhEa6kZLDW6Hx2uv1nIjgJ 0dGu28ZCdrPJGot0UOFXkrESEpqaRaW4QXTboyemSgcGji96LwjX6T3EyAzLXhoPizA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796116516; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:Sender:Reply-to: To:Subject:Cc:In-Reply-To:References:MIME-Version:Message-ID:Robot-ID: Robot-Unsubscribe:Precedence:Content-Type:Content-Transfer-Encoding; bh=mXE+fO0xvCi2GYwqTPPkawpQc46CsFCljT7mRaIgsLg=; b=UJ/ouGF396m4QviHHy3aeQauqCJAYQwwV6RuIP4JSTtxTSBIPeQ+HyzpVHH4RstBecdk 0nTHLBNeUkzgDcKNqP3FxKCF9ss1ZUZLhqzzDvPacaxUHLAEBpVpVv5R5tGbf+YPlSzv2 4dYdQWTeFHK6qCPwcO0SKXIfQBZrVAj6TJ+3FWN3h5Fpw60b7/BA/c02pLTXWAs4H3QMT 2+3ZXn3gkDWpO/KPz45PqsWRLGP1mC5nosLfcA46dkQxc9Msf2e0jBm0zP/Gt3A31R7yP 4ZNco3w1Z9U+vLasTFlsuYxu82k7wPcLND/Ad6vINnVesnU3fDdyFmP0fJLwM9okrrg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=Xx+Q9OHv; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=5oxt32F+; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2A03606A332; Tue, 1 Dec 2026 09:15:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D2A03606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=Xx+Q9OHv; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=5oxt32F+ Date: Tue, 01 Dec 2026 09:15:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796116514; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mXE+fO0xvCi2GYwqTPPkawpQc46CsFCljT7mRaIgsLg=; b=Xx+Q9OHvsZNzrth4R29LNm2y3DSHwuHdTmdmv3+2o+1Nfm9AJ7cTx3ZM989Jw7wY5kcvYt XcQrqe4UNcBMu/YQ0V0/mh2M81HltIG+Mw4z7IYstVWvC6juJGSNvaTNbNhdrb2MPzwB6p HBddjo/If/TxuzCfZ49ZgI/pVrYsoBM1lr7i1jM8uctu1CWKhIvk0MiTvHjs2hIzFOU6dz KVzn+yBprl8KvesqPvuNPLp4KnbRR4YeLy2FMyvjnaJB3yMW1EnVti3jwSlkHLGQHlwrBx T6ZG6gjxsyBg283iQLDXolMVrCzvgnK+jZIsTUvqSNE5aq0SDku6hT0OKzvMKQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796116514; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mXE+fO0xvCi2GYwqTPPkawpQc46CsFCljT7mRaIgsLg=; b=5oxt32F+6xaL2AGVSJRnPrGxURmfWWLNKduogY08bfczDU5BWA4qvlJ3yz5v9EJ23mE1Le 1eBcBpN8R7bS8iBA== From: "tip-bot2 for Akshat Singh" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/drivers] irqchip/econet-en751221: Chain the handler to all parent interrupts Cc: Akshat Singh , Thomas Gleixner , Caleb James DeLisle , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20261115-en751221-intc-all-lines-v1-2-dc03a40f47f0@gmail.com> References: <20261115-en751221-intc-all-lines-v1-2-dc03a40f47f0@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-ID: <179611651247.1190409.8134644087862228113.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/drivers branch of tip: Commit-ID: 79c94a0c661ceadfa44ad7df29edd50536325364 Gitweb: https://git.kernel.org/tip/79c94a0c661ceadfa44ad7df29edd505363= 25364 Author: Akshat Singh AuthorDate: Sun, 15 Nov 2026 19:26:02=20 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner Tested-by: Caleb James DeLisle Link: https://patch.msgid.link/20261115-en751221-intc-all-lines-v1-2-dc03a40f= 47f0@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-econ= et-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 2= 9, * 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 =3D 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 */ =20 @@ -145,9 +154,12 @@ static void econet_intc_from_parent(struct irq_desc *des= c) pending0 =3D ioread32(econet_intc.membase + REG_PENDING0); pending1 =3D ioread32(econet_intc.membase + REG_PENDING1); =20 - 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 =3D 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 =3D of_irq_count(node); + irq_set_chained_handler_and_data(irq, econet_intc_from_parent, domain); + + for (int i =3D 1; i < nr_parents; i++) { + int parent =3D 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); + } } =20 econet_intc.domain =3D domain;