summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch')
-rw-r--r--patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch
new file mode 100644
index 0000000..d1f71b5
--- /dev/null
+++ b/patches/boot_time_opt/0116-smpboot-reuse-timer-calibration.patch
@@ -0,0 +1,31 @@
1From 16104411cc5a7b20f310e3ecede85343ee6ce6b9 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 116/124] 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 46b2f41f8b05..88553c1f21f1 100644
17--- a/arch/x86/kernel/tsc.c
18+++ b/arch/x86/kernel/tsc.c
19@@ -1384,6 +1384,9 @@ unsigned long calibrate_delay_is_known(void)
20 if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC))
21 return 0;
22
23+ if (cpu != 0)
24+ return cpu_data(0).loops_per_jiffy;
25+
26 if (!mask)
27 return 0;
28
29--
302.11.1
31