Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-12 Thread Alexander Gordeev
On Tue, Jul 12, 2016 at 11:13:00AM +0200, Christoph Hellwig wrote: > On Mon, Jul 11, 2016 at 12:43:41PM +0200, Alexander Gordeev wrote: > > > I diagreed - if we deprecated functions the only thing that should > > > be mentioned is a "don't use these". > > > > I will try to paraphrase myself. The

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-12 Thread Christoph Hellwig
On Mon, Jul 11, 2016 at 12:43:41PM +0200, Alexander Gordeev wrote: > > I diagreed - if we deprecated functions the only thing that should > > be mentioned is a "don't use these". > > I will try to paraphrase myself. The new API deprecates pci_enable_msi*_range > functions, but I am not that sure

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-11 Thread Alexander Gordeev
On Sun, Jul 10, 2016 at 05:47:37AM +0200, Christoph Hellwig wrote: > On Wed, Jul 06, 2016 at 10:05:45AM +0200, Alexander Gordeev wrote: > > > + pci_enable_msi, pci_enable_msi_range, pci_enable_msi_exact, > > > pci_disable_msi, > > > + pci_msi_vec_count, pci_enable_msix_range, pci_enable_msix_exact

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-09 Thread Christoph Hellwig
On Wed, Jul 06, 2016 at 10:05:45AM +0200, Alexander Gordeev wrote: > > + pci_enable_msi, pci_enable_msi_range, pci_enable_msi_exact, > > pci_disable_msi, > > + pci_msi_vec_count, pci_enable_msix_range, pci_enable_msix_exact, > > + pci_disable_msix, pci_msix_vec_count > > Description of these func

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-06 Thread Alexander Gordeev
On Mon, Jul 04, 2016 at 05:39:28PM +0900, Christoph Hellwig wrote: > Add a function to allocate a range of interrupt vectors, which will > transparently use MSI-X and MSI if available or fallback to legacy > vectors. The interrupts are available in a core managed array in the > pci_dev structure,

[PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-07-04 Thread Christoph Hellwig
Add a function to allocate a range of interrupt vectors, which will transparently use MSI-X and MSI if available or fallback to legacy vectors. The interrupts are available in a core managed array in the pci_dev structure, and can also be released using a similar function. A new helper, __pci_enab

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-06-30 Thread Christoph Hellwig
On Thu, Jun 30, 2016 at 07:28:09PM +0200, Alexander Gordeev wrote: > I think I need to look at the updated version :) I've astarted processing the comments for the whole series and plan to post an update tomorrow. > > > > +#define PCI_IRQ_NOMSIX (1 << 0) /* don't try to use MSI-X > > > >

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-06-30 Thread Alexander Gordeev
On Thu, Jun 30, 2016 at 06:54:17PM +0200, Christoph Hellwig wrote: > > > +static unsigned int pci_nr_irq_vectors(struct pci_dev *pdev) > > > +{ > > > + int nr_entries; > > > + > > > + nr_entries = pci_msix_vec_count(pdev); > > > + if (nr_entries <= 0 && pci_msi_supported(pdev, 1)) > > > + n

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-06-30 Thread Christoph Hellwig
On Thu, Jun 23, 2016 at 01:16:10PM +0200, Alexander Gordeev wrote: > New APIs should be documented in Documentation/PCI/MSI-HOWTO.txt, I guess. Ok, done. > > +static unsigned int pci_nr_irq_vectors(struct pci_dev *pdev) > > +{ > > + int nr_entries; > > + > > + nr_entries = pci_msix_vec_count(

Re: [PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-06-23 Thread Alexander Gordeev
On Tue, Jun 14, 2016 at 09:59:00PM +0200, Christoph Hellwig wrote: > Add a helper to allocate a range of interrupt vectors, which will > transparently use MSI-X and MSI if available or fallback to legacy > vectors. The interrupts are available in a core managed array > in the pci_dev structure, an

[PATCH 07/13] pci: Provide sensible irq vector alloc/free routines

2016-06-14 Thread Christoph Hellwig
Add a helper to allocate a range of interrupt vectors, which will transparently use MSI-X and MSI if available or fallback to legacy vectors. The interrupts are available in a core managed array in the pci_dev structure, and can also be released using a similar helper. The next patch will also ad