From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E23EAC43458 for ; Wed, 8 Jul 2026 10:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QVQjk372EQ/aOAJi0x59NYkNGigxMXbij6zxAURUnhQ=; b=zUT0CRfMGNuAod/jVjsL8AthBQ kvaf+5BFH/riwzZpEAR42JGPzBRvlXeVSIfrBjT0148guBOPrnMPc7HEaWfQRqoogsu4CDtmkEr53 bZ8ExhTi8kFxsQfLOlwZoqyxheHwF+4HOG+jmIe0NrTJqVt3mei6I2iqk/JjF1wZ6xWNzkEapK07t Eq9d5rK5lntGZsol2CMH9FRDoNV/G9f31gRBBwVXGSLn9GkA7oGOW7bm5wbY1n2naYSACPEn/Ew4e ytl2hwiJ+0FFYSEOklPgIS1tHoZXPZfGP6ssDFYLlYNgiBQL/O4KfA+x/2TrgQMTCIFj8XQOL/mEa /KriYK5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1whPK6-0000000GqOM-2MEJ; Wed, 08 Jul 2026 10:16:10 +0000 Received: from smtpout-02.galae.net ([185.246.84.56]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1whPK0-0000000GqGb-2wmU for linux-arm-kernel@lists.infradead.org; Wed, 08 Jul 2026 10:16:07 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 2AC931A0EE0; Wed, 8 Jul 2026 10:16:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C490460337; Wed, 8 Jul 2026 10:16:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id EC20211BC3441; Wed, 8 Jul 2026 12:15:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1783505761; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=QVQjk372EQ/aOAJi0x59NYkNGigxMXbij6zxAURUnhQ=; b=DSEs8fMDeP/WWEwk61m/T0e2qmm05KRT/+q28FATN+T+VD72LPiZllhnFvh/Hw7THfdTne N8qV6xtalmc7fdkli0jgAQJ6vcnr2R2ccsJNEZSmAOksCpBrcoaldsxV+Xn2ta2V24f4HF LcULpT+XNrPsc3YNuKuFRG2Bn6Hh5HZ9j7J1kSSjPLUSafW2piDsdhBqbMzx/YGIbEHGEj u4Svt65rNegyALp8PfWf/w4poWF+cjBFHtFUpd3u9h9UCO5+S7mkbWoLUAEjIMagxHZ3SS KxCnkLXaVNbzkHxXFkNJZYEgre+S1M/642bIGdOuNTWBeczmxr0sbrqapY1UBA== From: Paul Louvel Date: Wed, 08 Jul 2026 12:15:19 +0200 Subject: [PATCH v2 06/10] soc: fsl: qe: Iterate over all pending interrupts in cascade handler MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260708-qe-pic-gpios-v2-6-1972044cfbd1@bootlin.com> References: <20260708-qe-pic-gpios-v2-0-1972044cfbd1@bootlin.com> In-Reply-To: <20260708-qe-pic-gpios-v2-0-1972044cfbd1@bootlin.com> To: Qiang Zhao , "Christophe Leroy (CS GROUP)" , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Paul Louvel , Herve Codina X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783505738; l=1700; i=paul.louvel@bootlin.com; s=20260313; h=from:subject:message-id; bh=r3vHDvUHA4dsL1TckJnFW5O/nSaMdIgcvEIKqUzCiFU=; b=ABpT7RMI/xBzLmktdMmKXMO8zvzIO82law6Twa+KbFNhxcTIjcjZuEkcgCDCJ8oAn/2GgsYMV MGbI0UFWhEeDmThOPn8z2KSed9MI3EtbSACz1kkITb0/AbrbQPX6PH5 X-Developer-Key: i=paul.louvel@bootlin.com; a=ed25519; pk=eLW50NT18UAvUT5cAcYf88zNbBCZDLFXuptpyLVhVIU= X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260708_031604_914072_A096B3D0 X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of only servicing a single interrupt, the chained handler can handle all IRQs that have their bit set in the event register. This avoid multiple parent IRQ handler being serviced if more than one interrupt are pending on the QE PIC. Remove unused code. Signed-off-by: Paul Louvel --- drivers/soc/fsl/qe/qe_ports_ic.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ports_ic.c b/drivers/soc/fsl/qe/qe_ports_ic.c index c8fff45e353c..bc8b68e5d1a9 100644 --- a/drivers/soc/fsl/qe/qe_ports_ic.c +++ b/drivers/soc/fsl/qe/qe_ports_ic.c @@ -5,6 +5,7 @@ * Copyright (c) 2025 Christophe Leroy CS GROUP France (christophe.leroy@csgroup.eu) */ +#include #include #include #include @@ -70,25 +71,17 @@ static struct irq_chip qepic = { .irq_set_type = qepic_set_type, }; -static int qepic_get_irq(struct irq_desc *desc) -{ - struct qepic_data *data = irq_desc_get_handler_data(desc); - u32 event = ioread32be(data->reg + CEPIER); - - if (!event) - return -1; - - return 32 - ffs(event); -} - static void qepic_cascade(struct irq_desc *desc) { struct qepic_data *data = irq_desc_get_handler_data(desc); struct irq_chip *chip = irq_desc_get_chip(desc); + unsigned long event, bit; chained_irq_enter(chip, desc); - generic_handle_domain_irq(data->host, qepic_get_irq(desc)); + event = ioread32be(data->reg + CEPIER); + for_each_set_bit(bit, &event, 32) + generic_handle_domain_irq(data->host, 31 - bit); chained_irq_exit(chip, desc); } -- 2.55.0