]> code.ossystems Code Review - openembedded-core.git/blob
129823b6ce0614d3a5f856d9d29ff9a6170a17f8
[openembedded-core.git] /
1 From 3e6558b693dd1e69e3177bc248977f067a769f14 Mon Sep 17 00:00:00 2001
2 From: Arjan van de Ven <arjan@linux.intel.com>
3 Date: Sun, 20 Jul 2008 08:59:24 -0700
4 Subject: [PATCH] fastboot: hold the BKL over the async init call sequence
5
6 Regular init calls are called with the BKL held; make sure
7 the async init calls are also called with the BKL held.
8 While this reduces parallelism a little, it does provide
9 lock-for-lock compatibility. The hit to prallelism isn't too
10 bad, most of the init calls are done immediately or actually
11 block for their delays.
12
13 Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
14 Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 ---
16  init/main.c |    6 ++++++
17  1 files changed, 6 insertions(+), 0 deletions(-)
18
19 diff --git a/init/main.c b/init/main.c
20 index 6961de2..9e2aee8 100644
21 --- a/init/main.c
22 +++ b/init/main.c
23 @@ -744,8 +744,14 @@ static void __init do_async_initcalls(struct work_struct *dummy)
24  {
25         initcall_t *call;
26  
27 +       /*
28 +        * For compatibility with normal init calls... take the BKL
29 +        * not pretty, not desirable, but compatibility first
30 +        */
31 +       lock_kernel();
32         for (call = __async_initcall_start; call < __async_initcall_end; call++)
33                 do_one_initcall(*call);
34 +       unlock_kernel();
35  }
36  
37  static struct workqueue_struct *async_init_wq;
38 -- 
39 1.5.4.3
40