summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-01-02 23:00:19 +0100
committerDavid S. Miller <davem@davemloft.net>2015-01-03 14:32:57 -0500
commit113948d841e8d78039e5dbbb5248f5b73e99eafa (patch)
treedd83aa9e9cc3d6cae386afa57dad4046df7e33bd /kernel
parent897362e446436d245972e72c6bc5b33bd7a5c659 (diff)
downloadop-kernel-dev-113948d841e8d78039e5dbbb5248f5b73e99eafa.zip
op-kernel-dev-113948d841e8d78039e5dbbb5248f5b73e99eafa.tar.gz
spinlock: Add spin_lock_bh_nested()
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/locking/spinlock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c
index 4b082b5..db3ccb1 100644
--- a/kernel/locking/spinlock.c
+++ b/kernel/locking/spinlock.c
@@ -363,6 +363,14 @@ void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)
}
EXPORT_SYMBOL(_raw_spin_lock_nested);
+void __lockfunc _raw_spin_lock_bh_nested(raw_spinlock_t *lock, int subclass)
+{
+ __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
+ spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
+ LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
+}
+EXPORT_SYMBOL(_raw_spin_lock_bh_nested);
+
unsigned long __lockfunc _raw_spin_lock_irqsave_nested(raw_spinlock_t *lock,
int subclass)
{
OpenPOWER on IntegriCloud