summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/os/mlsetup.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/i86pc/os/mlsetup.c')
-rw-r--r--usr/src/uts/i86pc/os/mlsetup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/uts/i86pc/os/mlsetup.c b/usr/src/uts/i86pc/os/mlsetup.c
index 045adbcb7b..438f83b6e9 100644
--- a/usr/src/uts/i86pc/os/mlsetup.c
+++ b/usr/src/uts/i86pc/os/mlsetup.c
@@ -23,6 +23,7 @@
*
* Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright 2016 Joyent, Inc.
*/
/*
* Copyright (c) 2010, Intel Corporation.
@@ -61,6 +62,7 @@
#include <sys/promif.h>
#include <sys/pci_cfgspace.h>
#include <sys/bootvfs.h>
+#include <sys/tsc.h>
#ifdef __xpv
#include <sys/hypervisor.h>
#else
@@ -227,15 +229,15 @@ mlsetup(struct regs *rp)
*/
if ((get_hwenv() & HW_XEN_HVM) == 0 &&
is_x86_feature(x86_featureset, X86FSET_TSCP))
- patch_tsc_read(X86_HAVE_TSCP);
+ patch_tsc_read(TSC_TSCP);
else if (cpuid_getvendor(CPU) == X86_VENDOR_AMD &&
cpuid_getfamily(CPU) <= 0xf &&
is_x86_feature(x86_featureset, X86FSET_SSE2))
- patch_tsc_read(X86_TSC_MFENCE);
+ patch_tsc_read(TSC_RDTSC_MFENCE);
else if (cpuid_getvendor(CPU) == X86_VENDOR_Intel &&
cpuid_getfamily(CPU) <= 6 &&
is_x86_feature(x86_featureset, X86FSET_SSE2))
- patch_tsc_read(X86_TSC_LFENCE);
+ patch_tsc_read(TSC_RDTSC_LFENCE);
#endif /* !__xpv */
@@ -246,7 +248,7 @@ mlsetup(struct regs *rp)
* return 0.
*/
if (!is_x86_feature(x86_featureset, X86FSET_TSC))
- patch_tsc_read(X86_NO_TSC);
+ patch_tsc_read(TSC_NONE);
#endif /* __i386 && !__xpv */
#if defined(__amd64) && !defined(__xpv)