diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-02-16 12:13:11 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-02-18 05:21:29 -0500 |
commit | a6a309edba13866b31dc4d8aebad3864a6d56ade (patch) | |
tree | 0319ce25b1cc9ecbec8a4832d16abd933297fefa | |
parent | 612b72862b4dd7f3f5e42651522daac6733b8ea6 (diff) |
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
-rw-r--r-- | kernel/irq/affinity.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index d737dc60ab52..f18cd5aa33e8 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c | |||
@@ -264,20 +264,13 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd) | |||
264 | 264 | ||
265 | /* | 265 | /* |
266 | * Simple invocations do not provide a calc_sets() callback. Install | 266 | * Simple invocations do not provide a calc_sets() callback. Install |
267 | * the generic one. The check for affd->nr_sets is a temporary | 267 | * the generic one. |
268 | * workaround and will be removed after the NVME driver is converted | ||
269 | * over. | ||
270 | */ | 268 | */ |
271 | if (!affd->nr_sets && !affd->calc_sets) | 269 | if (!affd->calc_sets) |
272 | affd->calc_sets = default_calc_sets; | 270 | affd->calc_sets = default_calc_sets; |
273 | 271 | ||
274 | /* | 272 | /* Recalculate the sets */ |
275 | * If the device driver provided a calc_sets() callback let it | 273 | affd->calc_sets(affd, affvecs); |
276 | * recalculate the number of sets and their size. The check will go | ||
277 | * away once the NVME driver is converted over. | ||
278 | */ | ||
279 | if (affd->calc_sets) | ||
280 | affd->calc_sets(affd, affvecs); | ||
281 | 274 | ||
282 | if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS)) | 275 | if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS)) |
283 | return NULL; | 276 | return NULL; |
@@ -344,11 +337,6 @@ unsigned int irq_calc_affinity_vectors(unsigned int minvec, unsigned int maxvec, | |||
344 | 337 | ||
345 | if (affd->calc_sets) { | 338 | if (affd->calc_sets) { |
346 | set_vecs = maxvec - resv; | 339 | set_vecs = maxvec - resv; |
347 | } else if (affd->nr_sets) { | ||
348 | unsigned int i; | ||
349 | |||
350 | for (i = 0, set_vecs = 0; i < affd->nr_sets; i++) | ||
351 | set_vecs += affd->set_size[i]; | ||
352 | } else { | 340 | } else { |
353 | get_online_cpus(); | 341 | get_online_cpus(); |
354 | set_vecs = cpumask_weight(cpu_possible_mask); | 342 | set_vecs = cpumask_weight(cpu_possible_mask); |