summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch')
-rw-r--r--patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch39
1 files changed, 11 insertions, 28 deletions
diff --git a/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch
index 23b873f..22c2b07 100644
--- a/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch
+++ b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch
@@ -1,45 +1,28 @@
1From 12409839a8fcf30e6b83290f30f1187efe4a58b6 Mon Sep 17 00:00:00 2001 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan@linux.intel.com> 2From: Arjan van de Ven <arjan@linux.intel.com>
3Date: Wed, 11 Feb 2015 17:28:14 -0600 3Date: Wed, 11 Feb 2015 17:28:14 -0600
4Subject: [PATCH 107/114] smpboot: reuse timer calibration 4Subject: [PATCH] smpboot: reuse timer calibration
5 5
6NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. 6NO point recalibrating for known-constant tsc ...
7 7saves 200ms+ of boot time.
8Author: Arjan van de Ven <arjan@linux.intel.com>
9
10Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
11--- 8---
12 arch/x86/kernel/smpboot.c | 2 +- 9 arch/x86/kernel/tsc.c | 3 +++
13 arch/x86/kernel/tsc.c | 3 +++ 10 1 file changed, 3 insertions(+)
14 2 files changed, 4 insertions(+), 1 deletion(-)
15 11
16diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
17index f04479a8f74f..6f41d74350ec 100644
18--- a/arch/x86/kernel/smpboot.c
19+++ b/arch/x86/kernel/smpboot.c
20@@ -764,7 +764,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
29diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c 12diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
30index 714dfba6a1e7..96cddaf0f48b 100644 13index 49d925043171..704733712ec4 100644
31--- a/arch/x86/kernel/tsc.c 14--- a/arch/x86/kernel/tsc.c
32+++ b/arch/x86/kernel/tsc.c 15+++ b/arch/x86/kernel/tsc.c
33@@ -1438,6 +1438,9 @@ unsigned long calibrate_delay_is_known(void) 16@@ -1546,6 +1546,9 @@ unsigned long calibrate_delay_is_known(void)
34 if (!mask) 17 if (!constant_tsc || !mask)
35 return 0; 18 return 0;
36 19
37+ if (cpu !=0) 20+ if (cpu != 0)
38+ return cpu_data(0).loops_per_jiffy; 21+ return cpu_data(0).loops_per_jiffy;
39+ 22+
40 sibling = cpumask_any_but(mask, cpu); 23 sibling = cpumask_any_but(mask, cpu);
41 if (sibling < nr_cpu_ids) 24 if (sibling < nr_cpu_ids)
42 return cpu_data(sibling).loops_per_jiffy; 25 return cpu_data(sibling).loops_per_jiffy;
43-- 26--
442.13.2 27https://clearlinux.org
45 28