From: Arnd Bergmann <arnd@arndb.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 3/4] BKL: mark lock_kernel as deprecated
Date: Tue, 18 Jan 2011 22:17:01 +0100 [thread overview]
Message-ID: <1295385422-3592-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1295385422-3592-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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/smp_lock.h | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h
index 3a19882..a06eb78 100644
--- a/include/linux/smp_lock.h
+++ b/include/linux/smp_lock.h
@@ -30,24 +30,14 @@ extern void __lockfunc
_unlock_kernel(const char *func, const char *file, int line)
__releases(kernel_lock);
-#define lock_kernel() do { \
- _lock_kernel(__func__, __FILE__, __LINE__); \
-} while (0)
-
-#define unlock_kernel() do { \
- _unlock_kernel(__func__, __FILE__, __LINE__); \
-} while (0)
+static inline void __deprecated lock_kernel(void)
+{
+ _lock_kernel(__func__, __FILE__, __LINE__);
+}
-/*
- * 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)
+static inline void __deprecated unlock_kernel(void)
{
- lock_kernel();
- unlock_kernel();
+ _unlock_kernel(__func__, __FILE__, __LINE__);
}
#else
@@ -55,7 +45,6 @@ static inline void cycle_kernel_lock(void)
#ifdef CONFIG_BKL /* provoke build bug if not set */
#define lock_kernel()
#define unlock_kernel()
-#define cycle_kernel_lock() do { } while(0)
#endif /* CONFIG_BKL */
#define release_kernel_lock(task) do { } while(0)
--
1.7.1
next prev parent reply other threads:[~2011-01-18 21:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 21:16 [PATCH 0/4] Phasing out the BKL Arnd Bergmann
2011-01-18 21:16 ` [PATCH 1/4] drm/i810: remove " Arnd Bergmann
2011-01-18 21:17 ` [PATCH 2/4] BKL: disable by default Arnd Bergmann
2011-01-18 21:17 ` Arnd Bergmann [this message]
2011-01-18 21:17 ` [PATCH 4/4] BKL: move CONFIG_BKL to staging Arnd Bergmann
2011-01-19 15:44 ` Nick Bowler
2011-01-19 16:17 ` Arnd Bergmann
2011-01-19 18:21 ` Nick Bowler
2011-01-23 22:19 ` Andrew Hendry
[not found] ` <AANLkTimOzU328aHnB7+ERSq1ovPBSZgxNQsYRhLghH5L@mail.gmail.com>
2011-01-24 15:59 ` Arnd Bergmann
2011-01-25 0:33 ` Andrew Hendry
2011-01-25 12:06 ` Arnd Bergmann
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=1295385422-3592-4-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
all inboxes | Powered by JetHome®