summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-pci.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 13:06:14 -0600
committerJens Axboe <axboe@kernel.dk>2018-11-07 13:44:59 -0700
commited76e329d74a4b15ac0f5fd3adbd52ec0178a134 (patch)
tree628ce9d3ac0997faef04f2d9e4f4d169594fe366 /block/blk-mq-pci.c
parenta8908939af569ce2419f43fd56eeaf003bc3d85d (diff)
downloadlinux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.tar.gz
linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.tar.bz2
linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.zip
blk-mq: abstract out queue map
This is in preparation for allowing multiple sets of maps per queue, if so desired. Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-pci.c')
-rw-r--r--block/blk-mq-pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c
index db644ec624f5..40333d60a850 100644
--- a/block/blk-mq-pci.c
+++ b/block/blk-mq-pci.c
@@ -31,26 +31,26 @@
* that maps a queue to the CPUs that have irq affinity for the corresponding
* vector.
*/
-int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev,
+int blk_mq_pci_map_queues(struct blk_mq_queue_map *qmap, struct pci_dev *pdev,
int offset)
{
const struct cpumask *mask;
unsigned int queue, cpu;
- for (queue = 0; queue < set->nr_hw_queues; queue++) {
+ for (queue = 0; queue < qmap->nr_queues; queue++) {
mask = pci_irq_get_affinity(pdev, queue + offset);
if (!mask)
goto fallback;
for_each_cpu(cpu, mask)
- set->mq_map[cpu] = queue;
+ qmap->mq_map[cpu] = queue;
}
return 0;
fallback:
- WARN_ON_ONCE(set->nr_hw_queues > 1);
- blk_mq_clear_mq_map(set);
+ WARN_ON_ONCE(qmap->nr_queues > 1);
+ blk_mq_clear_mq_map(qmap);
return 0;
}
EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);