summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch')
-rw-r--r--patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch
new file mode 100644
index 0000000..5fe8cdf
--- /dev/null
+++ b/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch
@@ -0,0 +1,31 @@
1From 283fcb879f66da9659f1983bcf173476bae9292b Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan@linux.intel.com>
3Date: Wed, 11 Feb 2015 17:28:14 -0600
4Subject: [PATCH 114/126] smpboot: reuse timer calibration
5
6NO point recalibrating for known-constant tsc... saves 200ms+ of boot time.
7
8Author: Arjan van de Ven <arjan@linux.intel.com>
9
10Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
11---
12 arch/x86/kernel/tsc.c | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
16index ad2b925a808e..6aed4e79f290 100644
17--- a/arch/x86/kernel/tsc.c
18+++ b/arch/x86/kernel/tsc.c
19@@ -1352,6 +1352,9 @@ unsigned long calibrate_delay_is_known(void)
20 if (tsc_disabled || !constant_tsc || !mask)
21 return 0;
22
23+ if (cpu != 0)
24+ return cpu_data(0).loops_per_jiffy;
25+
26 sibling = cpumask_any_but(mask, cpu);
27 if (sibling < nr_cpu_ids)
28 return cpu_data(sibling).loops_per_jiffy;
29--
302.15.0
31