Re: [PATCH 4/5] nvme-pci: simplify nvme_setup_irqs() via .setup_affinity callback

2019-02-10 Thread Ming Lei
On Sun, Feb 10, 2019 at 07:49:12PM +0100, Thomas Gleixner wrote: > On Fri, 25 Jan 2019, Ming Lei wrote: > > +static int nvme_setup_affinity(const struct irq_affinity *affd, > > + struct irq_affinity_desc *masks, > > + unsigned int nmasks) > > +{ >

Re: [PATCH 4/5] nvme-pci: simplify nvme_setup_irqs() via .setup_affinity callback

2019-02-10 Thread Ming Lei
On Sun, Feb 10, 2019 at 05:39:20PM +0100, Thomas Gleixner wrote: > On Fri, 25 Jan 2019, Ming Lei wrote: > > > Use the callback of .setup_affinity() to re-caculate number > > of queues, and build irqs affinity with help of irq_build_affinity(). > > > > Then nvme_setup_irqs() gets simplified a

Re: [PATCH 4/5] nvme-pci: simplify nvme_setup_irqs() via .setup_affinity callback

2019-02-10 Thread Thomas Gleixner
On Fri, 25 Jan 2019, Ming Lei wrote: > +static int nvme_setup_affinity(const struct irq_affinity *affd, > +struct irq_affinity_desc *masks, > +unsigned int nmasks) > +{ > + struct nvme_dev *dev = affd->priv; > + int affvecs = nmasks -

Re: [PATCH 4/5] nvme-pci: simplify nvme_setup_irqs() via .setup_affinity callback

2019-02-10 Thread Thomas Gleixner
On Fri, 25 Jan 2019, Ming Lei wrote: > Use the callback of .setup_affinity() to re-caculate number > of queues, and build irqs affinity with help of irq_build_affinity(). > > Then nvme_setup_irqs() gets simplified a lot. I'm pretty sure you can achieve the same by reworking the core code

[PATCH 4/5] nvme-pci: simplify nvme_setup_irqs() via .setup_affinity callback

2019-01-25 Thread Ming Lei
Use the callback of .setup_affinity() to re-caculate number of queues, and build irqs affinity with help of irq_build_affinity(). Then nvme_setup_irqs() gets simplified a lot. Signed-off-by: Ming Lei --- drivers/nvme/host/pci.c | 97 - 1 file