From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 2/8] init: remove the BKL from startup code
Date: Sun, 4 Jul 2010 00:02:26 +0200 [thread overview]
Message-ID: <1278194552-24943-3-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1278194552-24943-1-git-send-email-arnd@arndb.de>
I have shown by code review that no driver takes
the BKL at init time any more, so whatever the
init code was locking against is no longer there
and it is now safe to remove the BKL there.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Steven Rostedt <rostedt@goodmis>
---
init/main.c | 5 -----
kernel/trace/trace.c | 8 --------
2 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/init/main.c b/init/main.c
index a42fdf4..9b34c1b 100644
--- a/init/main.c
+++ b/init/main.c
@@ -444,7 +444,6 @@ static noinline void __init_refok rest_init(void)
kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
rcu_read_unlock();
complete(&kthreadd_done);
- unlock_kernel();
/*
* The boot idle thread must execute schedule()
@@ -565,7 +564,6 @@ asmlinkage void __init start_kernel(void)
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
- lock_kernel();
tick_init();
boot_cpu_init();
page_address_init();
@@ -829,7 +827,6 @@ static noinline int init_post(void)
/* need to finish all async __init code before freeing the memory */
async_synchronize_full();
free_initmem();
- unlock_kernel();
mark_rodata_ro();
system_state = SYSTEM_RUNNING;
numa_default_policy();
@@ -869,8 +866,6 @@ static int __init kernel_init(void * unused)
* Wait until kthreadd is all set-up.
*/
wait_for_completion(&kthreadd_done);
- lock_kernel();
-
/*
* init can allocate pages on any node
*/
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 086d363..8047ca5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -734,13 +734,6 @@ __acquires(kernel_lock)
return -1;
}
- /*
- * When this gets called we hold the BKL which means that
- * preemption is disabled. Various trace selftests however
- * need to disable and enable preemption for successful tests.
- * So we drop the BKL here and grab it after the tests again.
- */
- unlock_kernel();
mutex_lock(&trace_types_lock);
tracing_selftest_running = true;
@@ -822,7 +815,6 @@ __acquires(kernel_lock)
#endif
out_unlock:
- lock_kernel();
return ret;
}
--
1.7.1
next prev parent reply other threads:[~2010-07-03 22:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-03 22:02 [PATCH 0/8] BKL removal, assorted patches Arnd Bergmann
2010-07-03 22:02 ` [PATCH 1/8] do_coredump: do not take BKL Arnd Bergmann
2010-07-09 23:25 ` Frederic Weisbecker
2010-07-03 22:02 ` Arnd Bergmann [this message]
2010-07-09 3:52 ` [PATCH 2/8] init: remove the BKL from startup code Frederic Weisbecker
2010-07-09 13:37 ` Frederic Weisbecker
2010-07-03 22:02 ` [PATCH 3/8] hpet: kill BKL, add compat_ioctl Arnd Bergmann
2010-07-03 22:02 ` [PATCH 4/8] proc/pci: kill BKL Arnd Bergmann
2010-08-13 23:33 ` Jesse Barnes
2010-07-03 22:02 ` [PATCH 5/8] dasd: no need for BKL in ioctl Arnd Bergmann
2010-07-03 22:02 ` [PATCH 6/8] isapnp: BKL removal Arnd Bergmann
2010-07-03 22:02 ` [PATCH 7/8] soundcore_open: Reduce the area BKL coverage Arnd Bergmann
2010-07-05 16:09 ` Takashi Iwai
2010-07-03 22:02 ` [PATCH 8/8] BKL: introduce CONFIG_BKL 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=1278194552-24943-3-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=fweisbec@gmail.com \
--cc=jkacur@redhat.com \
--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 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®