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 A3B0AC52D73 for ; Wed, 7 Aug 2024 16:47:47 +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:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KvmmZWgHwwY6uZJ2g/tEsdPpev+CVg62C8P1zoF+CoY=; b=EXnf+idC4FyesPOLj8/3sY21Wm pUHlyvlwfB6YU6Cwl35rA7aJT9ColLQpceZB4yNQ8hk2F2eEZ9iEKipzx0zUhkZ8eyjuxPHBABgaE aMruPKM3irWEpP2XilkrmS4E60rdmnMgLolMMgDU/+uWCDfm+uh6D0E6RASCxCYqdfPGIK3/JstXy A2VQtfe5l25V5JnE5xVzs6A7WE/h3Iv2D9HoGTd/da7MT8pRoQ1r1yeUzVewbgMGSQhe0puHV8G6V 06AMpMGXQoEmGnawt/j7LDcwh1Hq60MwRymQi3snS9UomDKGQkUCuPTqIpIOxYZPEYrWAJPtCSOt0 LJbUtGDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbjp5-00000005jT7-0AKz; Wed, 07 Aug 2024 16:47:39 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbjjG-00000005iNG-2kZt for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 16:41:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 063CFCE0B90; Wed, 7 Aug 2024 16:41:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2B82C4AF09; Wed, 7 Aug 2024 16:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723048896; bh=l9FZQ62AYepZnzBxigYIA0fby/7PYLbFBtO4D2s5qGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NAkRDsjJHpbBzs599RXE86zHZrvKObyDVsQ6XNAZVBSHw3bWNqtiPP2/oC/76Xlbw IWJ2wVAp9yIZAi9G/G42FXIceLbSxpGKcWxA/wMPU0U0YT0Osmug4nP0gNPgEvMVJB 4gcKNhRz3xSqP1/13BzdzlzRW5hW47CxRvZZPj0n3C3vuSnAg2Dt2uf4dtLOHIqsuV AJ7CkCursYn0nbn7ATsTZfCVfEuHBbyg0I6XVcoatLufVHmIeHpbvHzcuib8vuZ7F6 zEGRWea89YtEQDOt6r5HwgwlIy4wlU2gdpQfxGgJU/zSLe+xFbxrZF/mdj+ff70SVX mjYGy7xg1Xgug== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, arm@kernel.org, Andy Shevchenko , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH v2 10/12] irqchip/armada-370-xp: Iterate only valid bits of the per-CPU interrupt cause register Date: Wed, 7 Aug 2024 18:41:02 +0200 Message-ID: <20240807164104.4140-11-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240807164104.4140-1-kabel@kernel.org> References: <20240807164104.4140-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_094139_371081_6EFE6633 X-CRM114-Status: GOOD ( 12.28 ) 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 Use MPIC_PER_CPU_IRQS_NR (29) bound instead of BITS_PER_LONG (32) when iterating the bits of the per-CPU interrupt cause register, since there are only 29 per-CPU interrupts. The top 3 bits are always zero anyway. Signed-off-by: Marek BehĂșn --- drivers/irqchip/irq-armada-370-xp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 83afc3a27812..36d1bac8a99f 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -678,7 +678,7 @@ static void mpic_handle_cascade_irq(struct irq_desc *desc) cause = readl_relaxed(mpic->per_cpu + MPIC_PPI_CAUSE); cpuid = cpu_logical_map(smp_processor_id()); - for_each_set_bit(i, &cause, BITS_PER_LONG) { + for_each_set_bit(i, &cause, MPIC_PER_CPU_IRQS_NR) { irqsrc = readl_relaxed(mpic->base + MPIC_INT_SOURCE_CTL(i)); /* Check if the interrupt is not masked on current CPU. -- 2.44.2