]> git.baikalelectronics.ru Git - kernel.git/commit
cpumask: make cpumask_next_wrap available without smp
authorWillem de Bruijn <willemb@google.com>
Sun, 12 Aug 2018 13:14:03 +0000 (09:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Aug 2018 16:05:05 +0000 (09:05 -0700)
commit6c9f0033333618fc627d498b448e75fd5961b138
tree2b0e3b37fdd0d06b3cd3befd5b89c0f325a1f9b8
parent0db8118168ca26a7cbd487615b2502ab0f953fec
cpumask: make cpumask_next_wrap available without smp

The kbuild robot shows build failure on machines without CONFIG_SMP:

  drivers/net/virtio_net.c:1916:10: error:
    implicit declaration of function 'cpumask_next_wrap'

cpumask_next_wrap is exported from lib/cpumask.o, which has

    lib-$(CONFIG_SMP) += cpumask.o

same as other functions, also define it as static inline in the
NR_CPUS==1 branch in include/linux/cpumask.h.

If wrap is true and next == start, return nr_cpumask_bits, or 1.
Else wrap across the range of valid cpus, here [0].

Fixes: 1a683f5887d7 ("virtio_net: Stripe queue affinities across cores.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/cpumask.h