Mercurial > illumos > illumos-gate
diff usr/src/uts/i86pc/os/cpuid.c @ 8377:e4fb59d35f38
6292199 bcopy and kcopy should'nt use rep, smov
Portions contributed by Robert Kasten <robert.a.kasten@intel.com>
author | Bill Holler <Bill.Holler@Sun.COM> |
---|---|
date | Mon, 15 Dec 2008 18:03:13 -0800 |
parents | 2a682532f0ca |
children | a4853cd72a21 |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/os/cpuid.c Tue Dec 16 09:44:37 2008 +0800 +++ b/usr/src/uts/i86pc/os/cpuid.c Mon Dec 15 18:03:13 2008 -0800 @@ -3845,4 +3845,26 @@ } } +#if defined(__amd64) && !defined(__xpv) +/* + * Patch in versions of bcopy for high performance Intel Nhm processors + * and later... + */ +void +patch_memops(uint_t vendor) +{ + size_t cnt, i; + caddr_t to, from; + + if ((vendor == X86_VENDOR_Intel) && ((x86_feature & X86_SSE4_2) != 0)) { + cnt = &bcopy_patch_end - &bcopy_patch_start; + to = &bcopy_ck_size; + from = &bcopy_patch_start; + for (i = 0; i < cnt; i++) { + *to++ = *from++; + } + } +} +#endif /* __amd64 && !__xpv */ + #endif /* !__xpv */