[PATCH v3 2/7] kernel/locking: Fix compile error with qrwlock.c

From: Babu Moger
Date: Tue May 23 2017 - 17:48:23 EST


Saw these compile errors on SPARC when queued rwlock feature is enabled.

CC kernel/locking/qrwlock.o
kernel/locking/qrwlock.c: In function âqueued_read_lock_slowpathâ:
kernel/locking/qrwlock.c:89: error: implicit declaration of function âarch_spin_lockâ
kernel/locking/qrwlock.c:102: error: implicit declaration of function âarch_spin_unlockâ
make[4]: *** [kernel/locking/qrwlock.o] Error 1

Include spinlock.h in qrwlock.c to fix it.

Signed-off-by: Babu Moger <babu.moger@xxxxxxxxxx>
Reviewed-by: HÃkon Bugge <haakon.bugge@xxxxxxxxxx>
Reviewed-by: Jane Chu <jane.chu@xxxxxxxxxx>
Reviewed-by: Shannon Nelson <shannon.nelson@xxxxxxxxxx>
Reviewed-by: Vijay Kumar <vijay.ac.kumar@xxxxxxxxxx>
---
kernel/locking/qrwlock.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/locking/qrwlock.c b/kernel/locking/qrwlock.c
index cc3ed0c..2655f26 100644
--- a/kernel/locking/qrwlock.c
+++ b/kernel/locking/qrwlock.c
@@ -20,6 +20,7 @@
#include <linux/cpumask.h>
#include <linux/percpu.h>
#include <linux/hardirq.h>
+#include <linux/spinlock.h>
#include <asm/qrwlock.h>

/*
--
1.7.1