summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsudheer <none@none>2008-05-15 16:42:48 -0700
committersudheer <none@none>2008-05-15 16:42:48 -0700
commitd36ea5d8d005e23fe097efbc1795808d752d398f (patch)
treec9911e2ac20881d1b2a083213335b18bdeedb0b2 /usr/src
parentbd211b8556ef6b18ebf137419bd5555d65271664 (diff)
downloadillumos-joyent-d36ea5d8d005e23fe097efbc1795808d752d398f.tar.gz
6628773 Need to support rdtscp for Intel
Contributed by Ashok Raj <ashok.raj@intel.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/i86pc/os/cpuid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/uts/i86pc/os/cpuid.c b/usr/src/uts/i86pc/os/cpuid.c
index ea47049c76..e8f83b5ee9 100644
--- a/usr/src/uts/i86pc/os/cpuid.c
+++ b/usr/src/uts/i86pc/os/cpuid.c
@@ -1092,8 +1092,7 @@ cpuid_pass1(cpu_t *cpu)
if (x86_vendor == X86_VENDOR_AMD)
feature &= ~X86_SEP;
#endif
- if (x86_vendor == X86_VENDOR_AMD &&
- cp->cp_edx & CPUID_AMD_EDX_TSCP)
+ if (cp->cp_edx & CPUID_AMD_EDX_TSCP)
feature |= X86_TSCP;
break;
default:
@@ -2197,6 +2196,8 @@ cpuid_pass4(cpu_t *cpu)
*/
switch (cpi->cpi_vendor) {
case X86_VENDOR_Intel:
+ if ((x86_feature & X86_TSCP) == 0)
+ *edx &= ~CPUID_AMD_EDX_TSCP;
break;
case X86_VENDOR_AMD:
@@ -2251,6 +2252,8 @@ cpuid_pass4(cpu_t *cpu)
break;
case X86_VENDOR_Intel:
+ if (*edx & CPUID_AMD_EDX_TSCP)
+ hwcap_flags |= AV_386_TSCP;
/*
* Aarrgh.
* Intel uses a different bit in the same word.