summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 02:29:33 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 02:29:33 +0200
commit12e3d3cdd975fe986cc5c35f60b1467a8ec20b80 (patch)
tree14ec935d2e15f454ba69353fcf5329ac67f72e4f /block/blk-mq.h
parentMerge tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/d... (diff)
parentblk_mq: linux/blk-mq.h does not include all the headers it depends on (diff)
downloadlinux-12e3d3cdd975fe986cc5c35f60b1467a8ec20b80.tar.xz
linux-12e3d3cdd975fe986cc5c35f60b1467a8ec20b80.zip
Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block
Pull blk-mq irq/cpu mapping updates from Jens Axboe: "This is the block-irq topic branch for 4.9-rc. It's mostly from Christoph, and it allows drivers to specify their own mappings, and more importantly, to share the blk-mq mappings with the IRQ affinity mappings. It's a good step towards making this work better out of the box" * 'for-4.9/block-irq' of git://git.kernel.dk/linux-block: blk_mq: linux/blk-mq.h does not include all the headers it depends on blk-mq: kill unused blk_mq_create_mq_map() blk-mq: get rid of the cpumask in struct blk_mq_tags nvme: remove the post_scan callout nvme: switch to use pci_alloc_irq_vectors blk-mq: provide a default queue mapping for PCI device blk-mq: allow the driver to pass in a queue mapping blk-mq: remove ->map_queue blk-mq: only allocate a single mq_map per tag_set blk-mq: don't redistribute hardware queues on a CPU hotplug event
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 9b15d2ef7f7b..df6474cb5a4c 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -45,11 +45,15 @@ void blk_mq_disable_hotplug(void);
/*
* CPU -> queue mappings
*/
-extern unsigned int *blk_mq_make_queue_map(struct blk_mq_tag_set *set);
-extern int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues,
- const struct cpumask *online_mask);
+int blk_mq_map_queues(struct blk_mq_tag_set *set);
extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
+static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
+ int cpu)
+{
+ return q->queue_hw_ctx[q->mq_map[cpu]];
+}
+
/*
* sysfs helpers
*/