public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] irqchip: add the Alpine MSIX interrupt controller
Date: Mon, 8 Feb 2016 11:31:47 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1602081125560.25254@nanos> (raw)
In-Reply-To: <1454922971-17405-2-git-send-email-antoine.tenart@free-electrons.com>

Antoine,

On Mon, 8 Feb 2016, Antoine Tenart wrote:
> +static int alpine_msix_set_affinity(struct irq_data *irq_data,
> +				    const struct cpumask *mask, bool force)
> +{
> +	int ret;
> +
> +	ret = irq_chip_set_affinity_parent(irq_data, mask, force);
> +	return ret == IRQ_SET_MASK_OK ? IRQ_SET_MASK_OK_DONE : ret;

What's the point of this exercise? Why can't you just set the affinity
callback to irq_chip_set_affinity_parent() ?

> +static struct irq_chip alpine_msix_irq_chip = {
> +	.name			= "MSIx",
> +	.irq_mask		= alpine_msix_mask_msi_irq,
> +	.irq_unmask		= alpine_msix_unmask_msi_irq,
> +	.irq_eoi		= irq_chip_eoi_parent,
> +	.irq_set_affinity	= alpine_msix_set_affinity,
> +};
> +
> +static int alpine_msix_allocate_sgi(struct alpine_msix_data *priv, int num_req)
> +{
> +	int first, i;
> +
> +	spin_lock(&priv->msi_map_lock);
> +
> +	first = bitmap_find_next_zero_area(priv->msi_map, priv->num_spis, 0,
> +					   num_req, 0);
> +	if (first >= priv->num_spis) {
> +		spin_unlock(&priv->msi_map_lock);
> +		return -ENOSPC;
> +	}
> +
> +	for (i = 0; i < num_req; i++)
> +		set_bit(first + i, priv->msi_map);

  bitmap_set() ??

> +
> +	spin_unlock(&priv->msi_map_lock);
> +
> +	return priv->spi_first + first;
> +}
> +
> +static void alpine_msix_free_sgi(struct alpine_msix_data *priv, unsigned sgi,
> +				 int num_req)
> +{
> +	int i, first;
> +
> +	first = sgi - priv->spi_first;
> +
> +	spin_lock(&priv->msi_map_lock);
> +
> +	for (i = 0; i < num_req; i++)
> +		clear_bit(first + i, priv->msi_map);

  bitmap_clear() ??

> +	spin_unlock(&priv->msi_map_lock);
> +}

Thanks,

	tglx

  parent reply	other threads:[~2016-02-08 10:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08  9:16 [PATCH 0/6] irqchip: introduce the Alpine MSIX driver Antoine Tenart
2016-02-08  9:16 ` [PATCH 1/6] irqchip: add the Alpine MSIX interrupt controller Antoine Tenart
2016-02-08  9:44   ` Marc Zyngier
2016-02-08  9:53     ` Thomas Petazzoni
2016-02-08 10:08       ` Marc Zyngier
2016-02-08 10:26     ` Antoine Tenart
2016-02-08 10:32       ` Marc Zyngier
2016-02-08 10:44         ` Antoine Tenart
2016-02-08 10:56           ` Marc Zyngier
2016-02-08 11:01             ` Antoine Tenart
2016-02-08 14:04     ` Antoine Tenart
2016-02-08 14:11       ` Marc Zyngier
2016-02-08 10:31   ` Thomas Gleixner [this message]
2016-02-08 14:17     ` Antoine Tenart
2016-02-08 14:29       ` Marc Zyngier
2016-02-08 14:48         ` Antoine Tenart
2016-02-08 15:01           ` Marc Zyngier
2016-02-08  9:16 ` [PATCH 2/6] Documentation: bindings: document the Alpine MSIX driver Antoine Tenart
2016-02-08 14:55   ` Marc Zyngier
2016-02-08 15:05     ` Antoine Tenart
2016-02-08  9:16 ` [PATCH 3/6] arm64: dts: alpine: add the MSIX node in the Alpine v2 dtsi Antoine Tenart
2016-02-08  9:16 ` [PATCH 4/6] ARM: dts: alpine: add the MSIX node Antoine Tenart
2016-02-08  9:16 ` [PATCH 5/6] arm64: alpine: select the Alpine MSI controller driver Antoine Tenart
2016-02-08  9:16 ` [PATCH 6/6] arm: " Antoine Tenart

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=alpine.DEB.2.11.1602081125560.25254@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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