mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging
@ 2026-09-23  8:36 Eliav Farber
  2026-09-23  8:37 ` [PATCH 1/4] irqchip/alpine-msi: Use SPDX-License-Identifier Eliav Farber
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eliav Farber @ 2026-09-23  8:36 UTC (permalink / raw)
  To: Thomas Gleixner, Antoine Tenart
  Cc: Radu Rendec, linux-arm-kernel, linux-kernel, Eliav Farber

This series contains a few small cleanups for the Alpine MSIX irqchip
driver, followed by the addition of some optional debug logging.

Patches 1-3 are trivial, no-functional-change cleanups that address
the coding-style issues checkpatch reports for the file: convert the
license boilerplate to an SPDX identifier, drop the redundant
<asm/msi.h> include (already pulled in via <linux/msi.h>), and fix the
missing space after a comma in a GENMASK_ULL() invocation.

Patch 4 adds an info message on successful initialisation and debug
messages on the MSI interrupt allocation and free paths, to make it
easier to follow the driver flow when debugging.

Build-tested for arm64 with the aarch64 toolchain and KCFLAGS=-Werror.
The driver is used by the Alpine V2, Alpine V3 and AL8 SoCs.

Eliav Farber (4):
  irqchip/alpine-msi: Use SPDX-License-Identifier
  irqchip/alpine-msi: Drop redundant asm/msi.h include
  irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL
  irqchip/alpine-msi: Add debug logging for MSI allocation

 drivers/irqchip/irq-alpine-msi.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] irqchip/alpine-msi: Use SPDX-License-Identifier
  2026-09-23  8:36 [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging Eliav Farber
@ 2026-09-23  8:37 ` Eliav Farber
  2026-09-23  8:37 ` [PATCH 2/4] irqchip/alpine-msi: Drop redundant asm/msi.h include Eliav Farber
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Eliav Farber @ 2026-09-23  8:37 UTC (permalink / raw)
  To: Thomas Gleixner, Antoine Tenart
  Cc: Radu Rendec, linux-arm-kernel, linux-kernel, Eliav Farber

Replace the free-form GPL v2 license boilerplate with the equivalent
SPDX-License-Identifier tag, as preferred for new and updated files.
No functional change.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/irqchip/irq-alpine-msi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 6764d64e7950..0d97abb85e16 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Annapurna Labs MSIX support services
  *
  * Copyright (C) 2016, Amazon.com, Inc. or its affiliates. All Rights Reserved.
  *
  * Antoine Tenart <antoine.tenart@free-electrons.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
  */
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/4] irqchip/alpine-msi: Drop redundant asm/msi.h include
  2026-09-23  8:36 [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging Eliav Farber
  2026-09-23  8:37 ` [PATCH 1/4] irqchip/alpine-msi: Use SPDX-License-Identifier Eliav Farber
@ 2026-09-23  8:37 ` Eliav Farber
  2026-09-23  8:37 ` [PATCH 3/4] irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL Eliav Farber
  2026-09-23  8:37 ` [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation Eliav Farber
  3 siblings, 0 replies; 5+ messages in thread
From: Eliav Farber @ 2026-09-23  8:37 UTC (permalink / raw)
  To: Thomas Gleixner, Antoine Tenart
  Cc: Radu Rendec, linux-arm-kernel, linux-kernel, Eliav Farber

The driver already includes <linux/msi.h>, which itself pulls in
<asm/msi.h>, so the explicit arch include is redundant. Remove it;
checkpatch also flags the direct use of the asm header in favour of
the linux one. No functional change.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/irqchip/irq-alpine-msi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 0d97abb85e16..20f1f7f7612b 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -21,7 +21,6 @@
 #include <linux/slab.h>
 
 #include <asm/irq.h>
-#include <asm/msi.h>
 
 /* MSIX message address format: local GIC target */
 #define ALPINE_MSIX_SPI_TARGET_CLUSTER0		BIT(16)
-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/4] irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL
  2026-09-23  8:36 [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging Eliav Farber
  2026-09-23  8:37 ` [PATCH 1/4] irqchip/alpine-msi: Use SPDX-License-Identifier Eliav Farber
  2026-09-23  8:37 ` [PATCH 2/4] irqchip/alpine-msi: Drop redundant asm/msi.h include Eliav Farber
@ 2026-09-23  8:37 ` Eliav Farber
  2026-09-23  8:37 ` [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation Eliav Farber
  3 siblings, 0 replies; 5+ messages in thread
From: Eliav Farber @ 2026-09-23  8:37 UTC (permalink / raw)
  To: Thomas Gleixner, Antoine Tenart
  Cc: Radu Rendec, linux-arm-kernel, linux-kernel, Eliav Farber

Fix the coding-style issue reported by checkpatch:

  ERROR: space required after that ',' (ctx:VxV)

No functional change.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/irqchip/irq-alpine-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 20f1f7f7612b..8155f63cfd29 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -210,7 +210,7 @@ static int alpine_msix_init(struct device_node *node, struct device_node *parent
 	 * To select the primary GIC as the target GIC, bits [18:17] must be set
 	 * to 0x0. In this case, bit 16 (SPI_TARGET_CLUSTER0) must be set.
 	 */
-	priv->addr = res.start & GENMASK_ULL(63,20);
+	priv->addr = res.start & GENMASK_ULL(63, 20);
 	priv->addr |= ALPINE_MSIX_SPI_TARGET_CLUSTER0;
 
 	if (of_property_read_u32(node, "al,msi-base-spi", &priv->spi_first)) {
-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation
  2026-09-23  8:36 [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging Eliav Farber
                   ` (2 preceding siblings ...)
  2026-09-23  8:37 ` [PATCH 3/4] irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL Eliav Farber
@ 2026-09-23  8:37 ` Eliav Farber
  3 siblings, 0 replies; 5+ messages in thread
From: Eliav Farber @ 2026-09-23  8:37 UTC (permalink / raw)
  To: Thomas Gleixner, Antoine Tenart
  Cc: Radu Rendec, linux-arm-kernel, linux-kernel, Eliav Farber

Add log messages to help follow the driver flow when debugging: an
info message on successful initialisation, and debug messages on the
MSI interrupt allocation and free paths.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/irqchip/irq-alpine-msi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 8155f63cfd29..0e68f81014e7 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -104,6 +104,8 @@ static int alpine_msix_middle_domain_alloc(struct irq_domain *domain, unsigned i
 	struct alpine_msix_data *priv = domain->host_data;
 	int sgi, err, i;
 
+	pr_debug("trying to allocate %d msi starting from %d\n", nr_irqs, virq);
+
 	sgi = alpine_msix_allocate_sgi(priv, nr_irqs);
 	if (sgi < 0)
 		return sgi;
@@ -116,6 +118,9 @@ static int alpine_msix_middle_domain_alloc(struct irq_domain *domain, unsigned i
 		irq_domain_set_hwirq_and_chip(domain, virq + i, sgi + i,
 					      &middle_irq_chip, priv);
 	}
+
+	pr_debug("allocated %d msi starting from %d\n", nr_irqs, virq);
+
 	return 0;
 
 err_sgi:
@@ -132,6 +137,8 @@ static void alpine_msix_middle_domain_free(struct irq_domain *domain, unsigned i
 
 	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
 	alpine_msix_free_sgi(priv, d->hwirq, nr_irqs);
+
+	pr_debug("freed %d msi starting from %d\n", nr_irqs, virq);
 }
 
 static const struct irq_domain_ops alpine_msix_middle_domain_ops = {
@@ -235,6 +242,9 @@ static int alpine_msix_init(struct device_node *node, struct device_node *parent
 	if (ret)
 		return ret;
 
+	pr_info("initialized successfully, spi %d to %d\n",
+		priv->spi_first, priv->spi_first + priv->num_spis - 1);
+
 	retain_and_null_ptr(priv);
 	retain_and_null_ptr(msi_map);
 	return 0;
-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-23  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23  8:36 [PATCH 0/4] irqchip/alpine-msi: Cleanups and debug logging Eliav Farber
2026-09-23  8:37 ` [PATCH 1/4] irqchip/alpine-msi: Use SPDX-License-Identifier Eliav Farber
2026-09-23  8:37 ` [PATCH 2/4] irqchip/alpine-msi: Drop redundant asm/msi.h include Eliav Farber
2026-09-23  8:37 ` [PATCH 3/4] irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL Eliav Farber
2026-09-23  8:37 ` [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation Eliav Farber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®