From: Marcel Holtmann <marcel@holtmann.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Add missing spin_lock_irqsave_nested
Date: Fri, 24 Nov 2006 11:04:48 +0100 [thread overview]
Message-ID: <1164362688.28284.14.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
Hi,
the latest tree has a change in net/irda/irlmp.c that uses the lockdep
annotation spin_lock_irqsave_nested. The only problem is that the
irqsave variant doesn't exists at the moment.
The attached patch is an attempt to fix this. It is only compile tested
and I hope that I did everything right. Please double-check, because I
don't touch these parts of the kernel code very often.
Regards
Marcel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2705 bytes --]
[PATCH] Add missing spin_lock_irqsave_nested
This patch adds the missing spin_lock_irqsave_nested annotation which
is used by net/irda/irlmp.c now.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
commit 45896a1478804f8849f670dd5ff9dd436a811009
tree 53b1f451f04b45c324178b06e8d386f2f3d2fb60
parent 1abbfb412b1610ec3a7ec0164108cee01191d9f5
author Marcel Holtmann <marcel@holtmann.org> Fri, 24 Nov 2006 11:02:41 +0100
committer Marcel Holtmann <marcel@holtmann.org> Fri, 24 Nov 2006 11:02:41 +0100
include/linux/spinlock.h | 2 ++
include/linux/spinlock_api_smp.h | 2 ++
include/linux/spinlock_api_up.h | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index b800d2d..7f2b448 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -175,8 +175,10 @@ #define spin_lock(lock) _spin_lock(loc
#ifdef CONFIG_DEBUG_LOCK_ALLOC
# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass)
+# define spin_lock_irqsave_nested(lock, flags, subclass) flags = _spin_lock_irqsave_nested(lock, flags, subclass)
#else
# define spin_lock_nested(lock, subclass) _spin_lock(lock)
+# define spin_lock_irqsave_nested(lock, flags, subclass) flags = _spin_lock_irqsave(lock)
#endif
#define write_lock(lock) _write_lock(lock)
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h
index 8828b81..8a2307c 100644
--- a/include/linux/spinlock_api_smp.h
+++ b/include/linux/spinlock_api_smp.h
@@ -32,6 +32,8 @@ void __lockfunc _read_lock_irq(rwlock_t
void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock);
unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
__acquires(lock);
+unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass)
+ __acquires(lock);
unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
__acquires(lock);
unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock)
diff --git a/include/linux/spinlock_api_up.h b/include/linux/spinlock_api_up.h
index 67faa04..76f834d 100644
--- a/include/linux/spinlock_api_up.h
+++ b/include/linux/spinlock_api_up.h
@@ -59,6 +59,7 @@ #define _spin_lock_irq(lock) __LOCK_IR
#define _read_lock_irq(lock) __LOCK_IRQ(lock)
#define _write_lock_irq(lock) __LOCK_IRQ(lock)
#define _spin_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _spin_lock_irqsave_nested(lock, flags, subclass) __LOCK_IRQSAVE(lock, flags)
#define _read_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
#define _write_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
#define _spin_trylock(lock) ({ __LOCK(lock); 1; })
reply other threads:[~2006-11-24 10:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1164362688.28284.14.camel@localhost \
--to=marcel@holtmann.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.