pH/kernel/patches/0008-smpboot-reuse-timer-calibration.patch
2017-10-16 02:36:00 +00:00

46 lines
1.4 KiB
Diff

From a312877651e18175726e33e4530307880d249aa5 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 11 Feb 2015 17:28:14 -0600
Subject: [PATCH 08/22] smpboot: reuse timer calibration
NO point recalibrating for known-constant tsc... saves 200ms+ of boot time.
Author: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
arch/x86/kernel/smpboot.c | 2 +-
arch/x86/kernel/tsc.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 36171bcd..7f4e9cdf 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -731,7 +731,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
- udelay(init_udelay);
+ udelay(100);
pr_debug("Deasserting INIT\n");
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6e57edf3..94ab049f 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1390,6 +1390,9 @@ unsigned long calibrate_delay_is_known(void)
if (!mask)
return 0;
+ if (cpu !=0)
+ return cpu_data(0).loops_per_jiffy;
+
sibling = cpumask_any_but(mask, cpu);
if (sibling < nr_cpu_ids)
return cpu_data(sibling).loops_per_jiffy;
--
2.11.0