x86/APIC: no need for timer calibration when using TDT

The only global effect of calibrate_APIC_clock() is the setting of
"bus_scale"; the final __setup_APIC_LVTT(0) is (at best) redundant with
the immediately following setup_APIC_timer() invocation. Yet "bus_scale"
isn't used when using TDT. Avoid wasting 100ms for calibration in this
case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2022-01-24 08:38:55 +01:00
1 parent fe9be76d88
commit 0731a56c7c
1 file changed
+6 -2
+6 -2
View File
@@ -1292,11 +1292,15 @@ void __init setup_boot_APIC_clock(void)
check_deadline_errata();
if ( !boot_cpu_has(X86_FEATURE_TSC_DEADLINE) )
tdt_enable = false;
local_irq_save(flags);
calibrate_APIC_clock();
if ( !tdt_enable || apic_verbosity )
calibrate_APIC_clock();
if ( tdt_enable && boot_cpu_has(X86_FEATURE_TSC_DEADLINE) )
if ( tdt_enable )
{
printk(KERN_DEBUG "TSC deadline timer enabled\n");
tdt_enabled = true;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.