blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL
authorChristoph Hellwig <hch@lst.de>
Thu, 17 Aug 2017 10:24:47 +0000 (12:24 +0200)
committerpopcornmix <popcornmix@gmail.com>
Fri, 25 Aug 2017 16:35:08 +0000 (17:35 +0100)
commitaa7b615c72961aa3cae61518c9112c14ac1e0a47
treecd62a9e0c1478f9958416439e7716506cf089c36
parent5ff023755406e25e9f78282fe1a117926614663f
blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL

commit c005390374957baacbc38eef96ea360559510aa7 upstream.

While pci_irq_get_affinity should never fail for SMP kernel that
implement the affinity mapping, it will always return NULL in the
UP case, so provide a fallback mapping of all queues to CPU 0 in
that case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq-pci.c