From: Arnd Bergmann <arnd@arndb.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 6/7] BKL: mark lock_kernel as deprecated
Date: Wed, 17 Nov 2010 16:26:58 +0100 [thread overview]
Message-ID: <1290007619-5787-7-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1290007619-5787-1-git-send-email-arnd@arndb.de>
No new code should use the big kernel lock, so
we should really emit compiler warnings to make
people building out of mainline code aware of
this.
Remove the unused cycle_kernel_lock() functions as well,
so we don't cause unnecessary build warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/smp_lock.h | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h
index 291f721..9590a0c 100644
--- a/include/linux/smp_lock.h
+++ b/include/linux/smp_lock.h
@@ -26,10 +26,12 @@ static inline int reacquire_kernel_lock(struct task_struct *task)
extern void __lockfunc
_lock_kernel(const char *func, const char *file, int line)
+__deprecated
__acquires(kernel_lock);
extern void __lockfunc
_unlock_kernel(const char *func, const char *file, int line)
+__deprecated
__releases(kernel_lock);
#define lock_kernel() do { \
@@ -40,24 +42,11 @@ __releases(kernel_lock);
_unlock_kernel(__func__, __FILE__, __LINE__); \
} while (0)
-/*
- * Various legacy drivers don't really need the BKL in a specific
- * function, but they *do* need to know that the BKL became available.
- * This function just avoids wrapping a bunch of lock/unlock pairs
- * around code which doesn't really need it.
- */
-static inline void cycle_kernel_lock(void)
-{
- lock_kernel();
- unlock_kernel();
-}
-
#else
#ifdef CONFIG_BKL /* provoke build bug if not set */
#define lock_kernel()
#define unlock_kernel()
-#define cycle_kernel_lock() do { } while(0)
#define kernel_locked() 1
#endif /* CONFIG_BKL */
--
1.7.1
next prev parent reply other threads:[~2010-11-17 15:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 15:26 [PATCH 0/7] BKL removal follow-up Arnd Bergmann
2010-11-17 15:26 ` [PATCH 1/7] staging/stradis: mark as "depends on BKL" Arnd Bergmann
2010-11-17 16:03 ` Greg KH
2010-11-17 15:26 ` [PATCH 2/7] drm/i810: remove the BKL Arnd Bergmann
2010-11-17 15:26 ` [PATCH 3/7] BKL: remove extraneous #include <smp_lock.h> Arnd Bergmann
2010-11-17 15:26 ` [PATCH 4/7] BKL: remove references to lock_kernel from comments Arnd Bergmann
2010-11-17 15:40 ` J. Bruce Fields
2010-11-17 15:26 ` [PATCH 5/7] BKL: disable by default Arnd Bergmann
2010-11-17 15:26 ` Arnd Bergmann [this message]
2010-11-17 15:26 ` [PATCH 7/7] BKL: move CONFIG_BKL to staging Arnd Bergmann
2010-11-18 23:34 ` [PATCH 0/7] BKL removal follow-up Jan Kara
2010-11-18 23:40 ` Linus Torvalds
2010-11-21 14:12 ` Boaz Harrosh
2010-11-21 17:45 ` Linus Torvalds
2010-11-22 15:17 ` Nick Bowler
2010-12-21 22:54 ` Arnd Bergmann
2010-12-22 15:23 ` Nick Bowler
2010-12-24 11:04 ` Evgeniy Dushistov
2010-12-30 14:58 ` Arnd Bergmann
2010-12-30 15:16 ` Evgeniy Dushistov
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=1290007619-5787-7-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome