From a5232cc4fbb594c213eff4844952cdcb4bd5f95a Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sun, 28 Jan 2018 18:18:03 +0000 Subject: [PATCH] Assume Always Running APIC Timer for AMD CPU families >= 0x12. Fallback to HPET may cause locks congestions on many-core systems. This change replicates Linux behavior. MFC after: 1 month --- sys/x86/x86/local_apic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index c9cc81f6ed2..3b8558b777e 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -526,6 +526,9 @@ native_lapic_init(vm_paddr_t addr) do_cpuid(0x06, regs); if ((regs[0] & CPUTPM1_ARAT) != 0) arat = 1; + } else if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) >= 0x12) { + arat = 1; } bzero(&lapic_et, sizeof(lapic_et)); lapic_et.et_name = "LAPIC";