diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-05-31 11:52:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-04 15:55:53 -0400 |
commit | 855615eee9b1989cac8ec5eaae4562db081a239b (patch) | |
tree | 9aedea64e6cadd4846e811d272f4d737092f1208 | |
parent | bd9240a18edfbfa72e957fc2ba831cf1f13ea073 (diff) |
x86/tsc: Remove the TSC_ADJUST clamp
Now that all affected platforms have a microcode update; and we check
this and disable TSC_DEADLINE and print a microcode revision update
error if its too old, we can remove the TSC_ADJUST clamp.
This should help with systems where the second socket runs ahead of
the first socket and needs a negative adjustment. In this case we'd
hit the 0 clamp and give up for not achieving synchronization.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: kevin.b.stanton@intel.com
Link: http://lkml.kernel.org/r/20170531155306.100950003@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/tsc_sync.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c index 728f75378475..7842371bc9e4 100644 --- a/arch/x86/kernel/tsc_sync.c +++ b/arch/x86/kernel/tsc_sync.c | |||
@@ -71,13 +71,8 @@ static void tsc_sanitize_first_cpu(struct tsc_adjust *cur, s64 bootval, | |||
71 | * non zero. We don't do that on non boot cpus because physical | 71 | * non zero. We don't do that on non boot cpus because physical |
72 | * hotplug should have set the ADJUST register to a value > 0 so | 72 | * hotplug should have set the ADJUST register to a value > 0 so |
73 | * the TSC is in sync with the already running cpus. | 73 | * the TSC is in sync with the already running cpus. |
74 | * | ||
75 | * But we always force positive ADJUST values. Otherwise the TSC | ||
76 | * deadline timer creates an interrupt storm. We also have to | ||
77 | * prevent values > 0x7FFFFFFF as those wreckage the timer as well. | ||
78 | */ | 74 | */ |
79 | if ((bootcpu && bootval != 0) || (!bootcpu && bootval < 0) || | 75 | if (bootcpu && bootval != 0) { |
80 | (bootval > 0x7FFFFFFF)) { | ||
81 | pr_warn(FW_BUG "TSC ADJUST: CPU%u: %lld force to 0\n", cpu, | 76 | pr_warn(FW_BUG "TSC ADJUST: CPU%u: %lld force to 0\n", cpu, |
82 | bootval); | 77 | bootval); |
83 | wrmsrl(MSR_IA32_TSC_ADJUST, 0); | 78 | wrmsrl(MSR_IA32_TSC_ADJUST, 0); |
@@ -451,20 +446,6 @@ retry: | |||
451 | */ | 446 | */ |
452 | cur->adjusted += cur_max_warp; | 447 | cur->adjusted += cur_max_warp; |
453 | 448 | ||
454 | /* | ||
455 | * TSC deadline timer stops working or creates an interrupt storm | ||
456 | * with adjust values < 0 and > x07ffffff. | ||
457 | * | ||
458 | * To allow adjust values > 0x7FFFFFFF we need to disable the | ||
459 | * deadline timer and use the local APIC timer, but that requires | ||
460 | * more intrusive changes and we do not have any useful information | ||
461 | * from Intel about the underlying HW wreckage yet. | ||
462 | */ | ||
463 | if (cur->adjusted < 0) | ||
464 | cur->adjusted = 0; | ||
465 | if (cur->adjusted > 0x7FFFFFFF) | ||
466 | cur->adjusted = 0x7FFFFFFF; | ||
467 | |||
468 | pr_warn("TSC ADJUST compensate: CPU%u observed %lld warp. Adjust: %lld\n", | 449 | pr_warn("TSC ADJUST compensate: CPU%u observed %lld warp. Adjust: %lld\n", |
469 | cpu, cur_max_warp, cur->adjusted); | 450 | cpu, cur_max_warp, cur->adjusted); |
470 | 451 | ||