From: Radu Rendec <radu@rendec.net>
To: Eliav Farber <farbere@amazon.com>,
Thomas Gleixner <tglx@kernel.org>,
Antoine Tenart <atenart@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation
Date: Sat, 24 Oct 2026 14:47:06 -0400 [thread overview]
Message-ID: <d413238a3c5533572013d1fb27142345aabdd101.camel@rendec.net> (raw)
In-Reply-To: <20260923083703.38974-5-farbere@amazon.com>
On Wed, 2026-09-23 at 08:37 +0000, Eliav Farber wrote:
> 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;
Not that this matters in reality (because all these numbers are "small")
but for the sake of correctness: all the variables you added messages
for are unsigned, so you should use %u on them.
Since you're cleaning up this driver, you may want to look at the other
prints. For example, the existing pr_debug() in alpine_msix_init() has
the same problem.
--
Regards,
Radu
next prev parent reply other threads:[~2026-10-24 18:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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-10-24 18:05 ` Radu Rendec
2026-09-23 8:37 ` [PATCH 2/4] irqchip/alpine-msi: Drop redundant asm/msi.h include Eliav Farber
2026-10-24 18:20 ` Radu Rendec
2026-09-23 8:37 ` [PATCH 3/4] irqchip/alpine-msi: Add missing space after comma in GENMASK_ULL Eliav Farber
2026-10-24 18:21 ` Radu Rendec
2026-09-23 8:37 ` [PATCH 4/4] irqchip/alpine-msi: Add debug logging for MSI allocation Eliav Farber
2026-10-24 18:47 ` Radu Rendec [this message]
2026-10-24 19:33 ` Farber, Eliav
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=d413238a3c5533572013d1fb27142345aabdd101.camel@rendec.net \
--to=radu@rendec.net \
--cc=atenart@kernel.org \
--cc=farbere@amazon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@kernel.org \
/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
all inboxes | Powered by JetHome®