From patchwork Mon Jul 15 10:51:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 13733310 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 DE16FC3DA5D for ; Mon, 15 Jul 2024 10:52:52 +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=B0lNPAQd9L+BKWNeE7Gqjs1LS8awyag0tTjDS7wvk7c=; b=iVgDU4fndLkKLCd7FA7ozbXTgF 3x4xRmy61IanQcXhhhf0QPtmC4mYGmYbg4PEAKh4ek9nMbdZuFQegcbGBnGA5AyaG243UbGodlUMc aqo+7jkffAAO/HBXS31ORaEhsLxOcWVwQM4zG+GgW9AXSEkPh8fAmi1Sps8gNX0Olc2CCvT7wj8bW z4HO15q5pCzEiqxn+kdfex9PhaMFwpG0QBKSOxXbj9aMUMWbPc7spIQuauH6ZiWZlAL8EPvK41sQh 0EowprkD7a1/GJXtfYSVjcVXoJODM+24djZxjuwF/DYffaGUwDdoCEWxm8O+4++qi7fIjHCOpeM2E INfBNKmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTJJx-00000006lXs-2dzG; Mon, 15 Jul 2024 10:52:41 +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 1sTJJQ-00000006lKs-3Ig4 for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 10:52:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3321BCE0ECE; Mon, 15 Jul 2024 10:52:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51BE5C4AF0A; Mon, 15 Jul 2024 10:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721040726; bh=Jsretw5fAsAe+nGUi2+h6BjL0rwdi6ENg+FAsgPqFPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nVy/R0Al9HiTmXtGvimEQ6CxU7pC+DyyFT8hghPBNrFfBJbsryTT2LN1J/IsRGF9V zEw4Q39kVuu/z3k2wdW0xgC6r693JXoHBFxFkUHNgUsylyWmXKNt9lmQ8S3sSS4eeh tcEKATCkxOwTfjMmNjXAPvbX2CmcARLGL648r/ppFE2VjRoi6veJmaR7uq4tJlVRJW cznomziUwIAvIZb+XWgu0EahMe+DZIYXIcLx1T1rkwAzy1rSxMCooO/3HWPFUxpwvB s+5KB85lVerngsLQNkJsMxic5gKDGaRJVARdZZDdX5MnwCPLY5ENxkRKsmQ3UmxXKi CdtHYir1b2f7g== From: =?utf-8?q?Marek_Beh=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_J=C3=A4rvinen?= Cc: =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 01/13] irqchip/armada-370-xp: Drop IPI_DOORBELL_START and rename IPI_DOORBELL_END Date: Mon, 15 Jul 2024 12:51:44 +0200 Message-ID: <20240715105156.18388-2-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240715105156.18388-1-kabel@kernel.org> References: <20240715105156.18388-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_035209_019857_A8538179 X-CRM114-Status: GOOD ( 13.68 ) 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 Drop IPI_DOORBELL_START since it is not used and rename IPI_DOORBELL_END to IPI_DOORBELL_NR. Signed-off-by: Marek BehĂșn --- drivers/irqchip/irq-armada-370-xp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index c93fab8ac2e4..8fb70a2e0206 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -136,8 +136,7 @@ #define MPIC_MAX_PER_CPU_IRQS 28 /* IPI and MSI interrupt definitions for IPI platforms */ -#define IPI_DOORBELL_START 0 -#define IPI_DOORBELL_END 8 +#define IPI_DOORBELL_NR 8 #define IPI_DOORBELL_MASK GENMASK(7, 0) #define PCI_MSI_DOORBELL_START 16 #define PCI_MSI_DOORBELL_NR 16 @@ -461,7 +460,7 @@ static const struct irq_domain_ops mpic_ipi_domain_ops = { static void mpic_ipi_resume(void) { - for (irq_hw_number_t i = 0; i < IPI_DOORBELL_END; i++) { + for (irq_hw_number_t i = 0; i < IPI_DOORBELL_NR; i++) { unsigned int virq = irq_find_mapping(mpic_ipi_domain, i); struct irq_data *d; @@ -478,18 +477,18 @@ static __init int mpic_ipi_init(struct device_node *node) int base_ipi; mpic_ipi_domain = irq_domain_create_linear(of_node_to_fwnode(node), - IPI_DOORBELL_END, + IPI_DOORBELL_NR, &mpic_ipi_domain_ops, NULL); if (WARN_ON(!mpic_ipi_domain)) return -ENOMEM; irq_domain_update_bus_token(mpic_ipi_domain, DOMAIN_BUS_IPI); - base_ipi = irq_domain_alloc_irqs(mpic_ipi_domain, IPI_DOORBELL_END, + base_ipi = irq_domain_alloc_irqs(mpic_ipi_domain, IPI_DOORBELL_NR, NUMA_NO_NODE, NULL); if (WARN_ON(!base_ipi)) return -ENOMEM; - set_smp_ipi_range(base_ipi, IPI_DOORBELL_END); + set_smp_ipi_range(base_ipi, IPI_DOORBELL_NR); return 0; } @@ -641,7 +640,7 @@ static void mpic_handle_ipi_irq(void) cause = readl_relaxed(per_cpu_int_base + MPIC_IN_DRBEL_CAUSE); cause &= IPI_DOORBELL_MASK; - for_each_set_bit(i, &cause, IPI_DOORBELL_END) + for_each_set_bit(i, &cause, IPI_DOORBELL_NR) generic_handle_domain_irq(mpic_ipi_domain, i); } #else