forked from luck/tmp_suning_uos_patched
genirq/affinity: Remove the leftovers of the original set support
Now that the NVME driver is converted over to the calc_set() callback, the workarounds of the original set support can be removed. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Bjorn Helgaas <helgaas@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org Cc: Sagi Grimberg <sagi@grimberg.me> Cc: linux-nvme@lists.infradead.org Cc: linux-pci@vger.kernel.org Cc: Keith Busch <keith.busch@intel.com> Cc: Sumit Saxena <sumit.saxena@broadcom.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Shivasharan Srikanteshwara <shivasharan.srikanteshwara@broadcom.com> Link: https://lkml.kernel.org/r/20190216172228.689834224@linutronix.de
This commit is contained in:
parent
612b72862b
commit
a6a309edba
|
@ -264,20 +264,13 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simple invocations do not provide a calc_sets() callback. Install
|
* Simple invocations do not provide a calc_sets() callback. Install
|
||||||
* the generic one. The check for affd->nr_sets is a temporary
|
* the generic one.
|
||||||
* workaround and will be removed after the NVME driver is converted
|
|
||||||
* over.
|
|
||||||
*/
|
*/
|
||||||
if (!affd->nr_sets && !affd->calc_sets)
|
if (!affd->calc_sets)
|
||||||
affd->calc_sets = default_calc_sets;
|
affd->calc_sets = default_calc_sets;
|
||||||
|
|
||||||
/*
|
/* Recalculate the sets */
|
||||||
* If the device driver provided a calc_sets() callback let it
|
affd->calc_sets(affd, affvecs);
|
||||||
* recalculate the number of sets and their size. The check will go
|
|
||||||
* away once the NVME driver is converted over.
|
|
||||||
*/
|
|
||||||
if (affd->calc_sets)
|
|
||||||
affd->calc_sets(affd, affvecs);
|
|
||||||
|
|
||||||
if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS))
|
if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -344,11 +337,6 @@ unsigned int irq_calc_affinity_vectors(unsigned int minvec, unsigned int maxvec,
|
||||||
|
|
||||||
if (affd->calc_sets) {
|
if (affd->calc_sets) {
|
||||||
set_vecs = maxvec - resv;
|
set_vecs = maxvec - resv;
|
||||||
} else if (affd->nr_sets) {
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0, set_vecs = 0; i < affd->nr_sets; i++)
|
|
||||||
set_vecs += affd->set_size[i];
|
|
||||||
} else {
|
} else {
|
||||||
get_online_cpus();
|
get_online_cpus();
|
||||||
set_vecs = cpumask_weight(cpu_possible_mask);
|
set_vecs = cpumask_weight(cpu_possible_mask);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user