All of lore.kernel.org
 help / color / mirror / Atom feed
From: andriy.shevchenko@linux.intel.com (Andy Shevchenko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] spi: pca2xx-pci: Allow MSI
Date: Mon, 16 Jan 2017 11:29:40 +0200	[thread overview]
Message-ID: <1484558980.2133.134.camel@linux.intel.com> (raw)
In-Reply-To: <4061bba80ecc632b219b56d8a8cd25d62658d48a.1484557560.git.jan.kiszka@siemens.com>

On Mon, 2017-01-16 at 10:06 +0100, Jan Kiszka wrote:
> Now that the core is ready for edge-triggered interrupts, we can
> safely
> allow the PCI versions that provide this to enable the feature and,
> thus, have less shared interrupts.
> 

My comments below.

> -	?if (IS_ERR(ssp->clk))
> +	if (IS_ERR(ssp->clk))
> ?		return PTR_ERR(ssp->clk);

This doesn't belong to the patch.
?
> +	pci_set_master(dev);
> +
> +	ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
> +	if (ret < 0) {
> +		clk_unregister(ssp->clk);
> +		return ret;
> +	}
> +	ssp->irq = pci_irq_vector(dev, 0);
> +

This looks good, though I would put it closer to the initial place of
ssp->irq assignment, i.e. before clock registering.

> +		pci_free_irq_vectors(dev);
> +	pci_free_irq_vectors(dev);

You know my answer, right? So, please be sure that we are using
pcim_alloc_irq_vectors().

Yes, I know there is (was?) no such API, needs to be created. Currently
this might make a mess on ->remove().

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	linux-arm-kernel@lists.infradead.org
Cc: Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	linux-kernel@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>,
	Sascha Weisenberger <sascha.weisenberger@siemens.com>
Subject: Re: [PATCH 2/2] spi: pca2xx-pci: Allow MSI
Date: Mon, 16 Jan 2017 11:29:40 +0200	[thread overview]
Message-ID: <1484558980.2133.134.camel@linux.intel.com> (raw)
In-Reply-To: <4061bba80ecc632b219b56d8a8cd25d62658d48a.1484557560.git.jan.kiszka@siemens.com>

On Mon, 2017-01-16 at 10:06 +0100, Jan Kiszka wrote:
> Now that the core is ready for edge-triggered interrupts, we can
> safely
> allow the PCI versions that provide this to enable the feature and,
> thus, have less shared interrupts.
> 

My comments below.

> -	 if (IS_ERR(ssp->clk))
> +	if (IS_ERR(ssp->clk))
>  		return PTR_ERR(ssp->clk);

This doesn't belong to the patch.
 
> +	pci_set_master(dev);
> +
> +	ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
> +	if (ret < 0) {
> +		clk_unregister(ssp->clk);
> +		return ret;
> +	}
> +	ssp->irq = pci_irq_vector(dev, 0);
> +

This looks good, though I would put it closer to the initial place of
ssp->irq assignment, i.e. before clock registering.

> +		pci_free_irq_vectors(dev);
> +	pci_free_irq_vectors(dev);

You know my answer, right? So, please be sure that we are using
pcim_alloc_irq_vectors().

Yes, I know there is (was?) no such API, needs to be created. Currently
this might make a mess on ->remove().

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-01-16  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  9:05 [PATCH 0/2] spi: pca2xx: Prepare for and enable MSI support Jan Kiszka
2017-01-16  9:05 ` Jan Kiszka
2017-01-16  9:05 ` [PATCH 1/2] spi: pxa2xx: Prepare for edge-triggered interrupts Jan Kiszka
2017-01-16  9:05   ` Jan Kiszka
2017-01-16  9:24   ` Andy Shevchenko
2017-01-16  9:24     ` Andy Shevchenko
2017-01-16 11:18     ` Jan Kiszka
2017-01-16 11:18       ` Jan Kiszka
2017-01-16 17:53       ` Andy Shevchenko
2017-01-16 17:53         ` Andy Shevchenko
2017-01-16 18:19         ` Jan Kiszka
2017-01-16 18:19           ` Jan Kiszka
2017-01-16  9:06 ` [PATCH 2/2] spi: pca2xx-pci: Allow MSI Jan Kiszka
2017-01-16  9:06   ` Jan Kiszka
2017-01-16  9:29   ` Andy Shevchenko [this message]
2017-01-16  9:29     ` Andy Shevchenko
2017-01-16 17:33     ` Jan Kiszka
2017-01-16 17:33       ` Jan Kiszka

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=1484558980.2133.134.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.