UPSTREAM: 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: 2ca653d607ce ("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>
(cherry picked from commit 9af18e56d43ca4864ce65c3542c513827c2697de)

BUG=b:130392469

TEST=Compiled. Requirement for previous patch in series.

Change-Id: Ib07261a492a358db0c678cc700d25571d907be12
Reviewed-on: https://chromium-review.googlesource.com/1566547
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Aditya Kali <adityakali@google.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from commit 2a66119a9539c1434dd557e953d4ac272eac5a56)
Signed-off-by: vaibhavrustagi <vaibhavrustagi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1619330
Reviewed-by: Zubin Mithra <zsm@chromium.org>
1 file changed