diff options
author | Adrian Calianu <adrian.calianu@enea.com> | 2021-05-11 09:42:24 +0200 |
---|---|---|
committer | Adrian Calianu <Adrian.Calianu@enea.com> | 2021-05-12 21:56:14 +0100 |
commit | c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8 (patch) | |
tree | 93a3d96c027a437fc9b168d07ab2ad62248d77d1 /patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch | |
parent | 7a93e54032bb148a92e16b59736a1b76fedae319 (diff) | |
download | enea-kernel-cache-c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8.tar.gz |
boot_time_opt: update patches to 5.10 kernel
Patches used in boot time optimization are coming from
clearlinux distribution. Update patches correspuding to 5.10
kernel: https://github.com/clearlinux-pkgs/linux/tree/5.10.32-1034
We selected a list of patches from ClearLinux. Those we have
considered risky, unknown impact on functionality have been
avoided.
Change-Id: If01459292a5a383b49944645bd8536d9a62d9de3
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Diffstat (limited to 'patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch')
-rw-r--r-- | patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch b/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch new file mode 100644 index 0000000..98b7b5f --- /dev/null +++ b/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 17 May 2017 01:52:11 +0000 | ||
4 | Subject: [PATCH] init: wait for partition and retry scan | ||
5 | |||
6 | As Clear Linux boots fast the device is not ready when | ||
7 | the mounting code is reached, so a retry device scan will | ||
8 | be performed every 0.5 sec for at least 40 sec | ||
9 | and synchronize the async task. | ||
10 | |||
11 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
12 | --- | ||
13 | init/do_mounts.c | 10 ++++++++++ | ||
14 | 1 file changed, 10 insertions(+) | ||
15 | |||
16 | diff --git a/init/do_mounts.c b/init/do_mounts.c | ||
17 | index b5f9604d0c98..6022ead20701 100644 | ||
18 | --- a/init/do_mounts.c | ||
19 | +++ b/init/do_mounts.c | ||
20 | @@ -225,11 +225,19 @@ dev_t name_to_dev_t(const char *name) | ||
21 | char *p; | ||
22 | dev_t res = 0; | ||
23 | int part; | ||
24 | + /* we will wait at least 40 sec */ | ||
25 | + int needtowait = 40<<1; | ||
26 | |||
27 | #ifdef CONFIG_BLOCK | ||
28 | if (strncmp(name, "PARTUUID=", 9) == 0) { | ||
29 | name += 9; | ||
30 | res = devt_from_partuuid(name); | ||
31 | + while (!res && needtowait) { | ||
32 | + /* waiting 0.5 sec */ | ||
33 | + msleep(500); | ||
34 | + res = devt_from_partuuid(name); | ||
35 | + needtowait--; | ||
36 | + } | ||
37 | if (!res) | ||
38 | goto fail; | ||
39 | goto done; | ||
40 | @@ -596,7 +604,9 @@ void __init prepare_namespace(void) | ||
41 | * For example, it is not atypical to wait 5 seconds here | ||
42 | * for the touchpad of a laptop to initialize. | ||
43 | */ | ||
44 | + async_synchronize_full(); | ||
45 | wait_for_device_probe(); | ||
46 | + async_synchronize_full(); | ||
47 | |||
48 | md_run_setup(); | ||
49 | |||
50 | -- | ||
51 | https://clearlinux.org | ||
52 | |||