From: "Marek Behún" <kabel@kernel.org>
To: "Andrew Lunn" <andrew@lunn.ch>,
"Gregory Clement" <gregory.clement@bootlin.com>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org, arm@kernel.org,
"Andy Shevchenko" <andy@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Marek Behún" <kabel@kernel.org>
Subject: [PATCH v2 01/12] irqchip/armada-370-xp: Drop IPI_DOORBELL_START and rename IPI_DOORBELL_END
Date: Wed, 7 Aug 2024 18:40:53 +0200 [thread overview]
Message-ID: <20240807164104.4140-2-kabel@kernel.org> (raw)
In-Reply-To: <20240807164104.4140-1-kabel@kernel.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 <kabel@kernel.org>
---
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 b11612acec78..9a431d04ed19 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
@@ -452,7 +451,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;
@@ -468,17 +467,17 @@ 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,
+ mpic_ipi_domain = irq_domain_create_linear(of_node_to_fwnode(node), 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, NUMA_NO_NODE, NULL);
+ 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;
}
@@ -627,7 +626,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
--
2.44.2
next prev parent reply other threads:[~2024-08-07 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 16:40 [PATCH v2 00/12] armada-370-xp irqchip updates round 5 Marek Behún
2024-08-07 16:40 ` Marek Behún [this message]
2024-08-07 16:40 ` [PATCH v2 02/12] irqchip/armada-370-xp: Drop msi_doorbell_end() Marek Behún
2024-08-07 16:40 ` [PATCH v2 03/12] irqchip/armada-370-xp: Add the __init attribute to mpic_msi_init() Marek Behún
2024-08-07 16:40 ` [PATCH v2 04/12] irqchip/armada-370-xp: Put __init attribute after return type in mpic_ipi_init() Marek Behún
2024-08-07 16:40 ` [PATCH v2 05/12] irqchip/armada-370-xp: Put static variables into driver private structure Marek Behún
2024-08-07 16:40 ` [PATCH v2 06/12] irqchip/armada-370-xp: Put MSI doorbell limits into the mpic structure Marek Behún
2024-08-07 16:40 ` [PATCH v2 07/12] irqchip/armada-370-xp: Pass around the driver private structure Marek Behún
2024-08-07 16:41 ` [PATCH v2 08/12] irqchip/armada-370-xp: Dynamically allocate " Marek Behún
2024-08-07 16:41 ` [PATCH v2 09/12] irqchip/armada-370-xp: Fix reenabling last per-CPU interrupt Marek Behún
2024-08-07 16:41 ` [PATCH v2 10/12] irqchip/armada-370-xp: Iterate only valid bits of the per-CPU interrupt cause register Marek Behún
2024-08-07 16:41 ` [PATCH v2 11/12] irqchip/armada-370-xp: Allow mapping only per-CPU interrupts Marek Behún
2024-08-07 16:41 ` [PATCH v2 12/12] irqchip/armada-370-xp: Use the mpic_is_ipi_available() helper in one more case Marek Behún
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=20240807164104.4140-2-kabel@kernel.org \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=andy@kernel.org \
--cc=arm@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).