From d40e0d4fb5613099a58c95a9403f51b03e40e861 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Wed, 5 Jul 2017 09:59:05 -0700 Subject: [PATCH] locking/qspinlock: Include linux/prefetch.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit kernel/locking/qspinlock.c makes use of prefetchw() but hasn't included linux/prefetch.h up until now, instead relying upon indirect inclusion of some header that defines prefetchw(). In the case of MIPS we generally obtain a definition of prefetchw() from asm/processor.h, included by way of linux/mutex.h, but only for configurations which select CONFIG_CPU_HAS_PREFETCH. For configurations which don't this leaves prefetchw() undefined leading to the following build failure: CC kernel/locking/qspinlock.o kernel/locking/qspinlock.c: In function ‘queued_spin_lock_slowpath’: kernel/locking/qspinlock.c:549:4: error: implicit declaration of function ‘prefetchw’ [-Werror=implicit-function-declaration] prefetchw(next); ^~~~~~~~~ Fix this by including linux/prefetch.h in order to ensure that we get a definition of prefetchw(). Signed-off-by: Paul Burton Cc: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle --- kernel/locking/qspinlock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c index b2caec7..fd24153 100644 --- a/kernel/locking/qspinlock.c +++ b/kernel/locking/qspinlock.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include -- 2.7.4