[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180813215546.3828228-1-arnd@arndb.de>
Date: Mon, 13 Aug 2018 23:55:16 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Peter Zijlstra <peterz@...radead.org>,
Caleb Raitto <caraitto@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
Alexey Dobriyan <adobriyan@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Rakib Mullick <rakib.mullick@...il.com>,
Amritha Nambiar <amritha.nambiar@...el.com>,
Michael Kelley <mhkelley@...look.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] cpumask: provide a dummy cpumask_next_wrap
The virtio_net driver has become the first one to call cpumask_next_wrap()
even if CONFIG_SMP is disabled, leading to a build error:
drivers/net/virtio_net.c: In function 'virtnet_set_affinity':
drivers/net/virtio_net.c:1916:10: error: implicit declaration of function 'cpumask_next_wrap'; did you mean 'cpumask_next_and'? [-Werror=implicit-function-declaration]
cpu = cpumask_next_wrap(cpu, cpu_online_mask,
Add a stub function along the lines of cpumask_first(), cpumask_next() etc.
I'm not entirely sure what should be returned in this case, but at
least for virtio_net, anything should work.
Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.")
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Caleb Raitto <caraitto@...gle.com>
Cc: Willem de Bruijn <willemb@...gle.com>
Cc: David S. Miller <davem@...emloft.net>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
include/linux/cpumask.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 57f20a0a7794..079ba06309bd 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -159,6 +159,11 @@ static inline unsigned int cpumask_next_and(int n,
return n+1;
}
+static inline int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap)
+{
+ return n;
+}
+
/* cpu must be a valid cpu, ie 0, so there's no other choice. */
static inline unsigned int cpumask_any_but(const struct cpumask *mask,
unsigned int cpu)
--
2.18.0
Powered by blists - more mailing lists