]> code.ossystems Code Review - openembedded-core.git/blob
faf96220919ba0c6320a94dff74f585bf475a9ce
[openembedded-core.git] /
1 From 50b6962016b824dfac254b8f36fc6cac301c8a8d Mon Sep 17 00:00:00 2001
2 From: Arjan van de Ven <arjan@linux.intel.com>
3 Date: Sun, 20 Jul 2008 10:20:49 -0700
4 Subject: [PATCH] fastboot: make fastboot a config option
5
6 to mitigate the risks of async bootup, make fastboot a configuration
7 option...
8
9 Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
10 Signed-off-by: Ingo Molnar <mingo@elte.hu>
11 ---
12  init/Kconfig |   11 +++++++++++
13  init/main.c  |    4 ++++
14  2 files changed, 15 insertions(+), 0 deletions(-)
15
16 diff --git a/init/Kconfig b/init/Kconfig
17 index 6199d11..7545c8b 100644
18 --- a/init/Kconfig
19 +++ b/init/Kconfig
20 @@ -524,6 +524,17 @@ config CC_OPTIMIZE_FOR_SIZE
21  
22           If unsure, say N.
23  
24 +config FASTBOOT
25 +       bool "Fast boot support"
26 +       help
27 +         The fastboot option will cause the kernel to try to optimize
28 +         for faster boot. 
29 +
30 +         This includes doing some of the device initialization asynchronous
31 +         as well as opportunistically trying to mount the root fs early.
32 +
33 +         If unsure, say N.
34 +
35  config SYSCTL
36         bool
37  
38 diff --git a/init/main.c b/init/main.c
39 index 6be1756..bb97add 100644
40 --- a/init/main.c
41 +++ b/init/main.c
42 @@ -776,7 +776,11 @@ static void __init do_initcalls(void)
43         for (call = __initcall_start; call < __initcall_end; call++) {
44                 if (phase == 0 && call >= __async_initcall_start) {
45                         phase = 1;
46 +#ifdef CONFIG_FASTBOOT
47                         queue_work(async_init_wq, &async_work);
48 +#else
49 +                       do_async_initcalls(NULL);
50 +#endif
51                 }
52                 if (phase == 1 && call >= __async_initcall_end)
53                         phase = 2;
54 -- 
55 1.5.4.3
56