diff options
| -rw-r--r-- | sys/amd64/amd64/identcpu.c | 20 | ||||
| -rw-r--r-- | sys/i386/i386/identcpu.c | 21 |
2 files changed, 26 insertions, 15 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 1a2b2f26f903..bcbef10f4927 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -360,14 +360,20 @@ printcpuinfo(void) * If this CPU supports P-state invariant TSC then * mention the capability. */ - if (!tsc_is_invariant && - (cpu_vendor_id == CPU_VENDOR_AMD && - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || - cpu_id == 0x60fb2))) { - tsc_is_invariant = 1; - printf("\n TSC: P-state invariant"); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || + AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2) + tsc_is_invariant = 1; + break; + case CPU_VENDOR_INTEL: + if (amd_pminfo & AMDPM_TSC_INVARIANT) + tsc_is_invariant = 1; + break; } + if (tsc_is_invariant) + printf("\n TSC: P-state invariant"); /* * If this CPU supports HTT or CMP then mention the diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index bb1b181c7c2b..4f90841300f6 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -864,15 +864,20 @@ printcpuinfo(void) * If this CPU supports P-state invariant TSC then * mention the capability. */ - if (!tsc_is_invariant && - ((cpu_vendor_id == CPU_VENDOR_AMD || - cpu_vendor_id == CPU_VENDOR_INTEL) && - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || - I386_CPU_FAMILY(cpu_id) >= 0x10 || - cpu_id == 0x60fb2))) { - tsc_is_invariant = 1; - printf("\n TSC: P-state invariant"); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || + I386_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2) + tsc_is_invariant = 1; + break; + case CPU_VENDOR_INTEL: + if (amd_pminfo & AMDPM_TSC_INVARIANT) + tsc_is_invariant = 1; + break; } + if (tsc_is_invariant) + printf("\n TSC: P-state invariant"); /* * If this CPU supports HTT or CMP then mention the |
