diff options
author | Adrian Calianu <adrian.calianu@enea.com> | 2017-09-27 10:37:36 +0200 |
---|---|---|
committer | Adrian Calianu <adrian.calianu@enea.com> | 2017-09-27 10:37:36 +0200 |
commit | ad4d4e5cbad3ad875eaa59e0a919c014dfb6a39e (patch) | |
tree | 9f4ec55e714e2be67dab4b775775b704af454f74 /patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch | |
parent | 7579efbdb49529f36652b69d4630c6c43907f77b (diff) | |
download | enea-kernel-cache-ad4d4e5cbad3ad875eaa59e0a919c014dfb6a39e.tar.gz |
add guest features from yocto branch
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Diffstat (limited to 'patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch')
-rw-r--r-- | patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch new file mode 100644 index 0000000..48be94a --- /dev/null +++ b/patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 634947be6c24d844af5f6ecf59453f2ddc09e032 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 11 Feb 2015 17:28:14 -0600 | ||
4 | Subject: [PATCH 108/114] smpboot: reuse timer calibration | ||
5 | |||
6 | NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. | ||
7 | |||
8 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
9 | |||
10 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
11 | --- | ||
12 | arch/x86/kernel/smpboot.c | 2 +- | ||
13 | arch/x86/kernel/tsc.c | 3 +++ | ||
14 | 2 files changed, 4 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c | ||
17 | index 99b920d0e516..e17bb425bb52 100644 | ||
18 | --- a/arch/x86/kernel/smpboot.c | ||
19 | +++ b/arch/x86/kernel/smpboot.c | ||
20 | @@ -761,7 +761,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | ||
21 | pr_debug("Waiting for send to finish...\n"); | ||
22 | send_status = safe_apic_wait_icr_idle(); | ||
23 | |||
24 | - udelay(init_udelay); | ||
25 | + udelay(100); | ||
26 | |||
27 | pr_debug("Deasserting INIT\n"); | ||
28 | |||
29 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c | ||
30 | index 37e7cf544e51..e99be8a6a132 100644 | ||
31 | --- a/arch/x86/kernel/tsc.c | ||
32 | +++ b/arch/x86/kernel/tsc.c | ||
33 | @@ -1413,6 +1413,9 @@ unsigned long calibrate_delay_is_known(void) | ||
34 | if (!mask) | ||
35 | return 0; | ||
36 | |||
37 | + if (cpu !=0) | ||
38 | + return cpu_data(0).loops_per_jiffy; | ||
39 | + | ||
40 | sibling = cpumask_any_but(mask, cpu); | ||
41 | if (sibling < nr_cpu_ids) | ||
42 | return cpu_data(sibling).loops_per_jiffy; | ||
43 | -- | ||
44 | 2.11.1 | ||
45 | |||