aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/x86/sys/__vdso_gettc.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-08-13 14:42:23 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-08-13 14:42:23 +0000
commitb1cbddaf5d12e17a58e3bc72942079e0921bbcee (patch)
tree920d150dc32eeef24d43d80023e552d9f1d71268 /lib/libc/x86/sys/__vdso_gettc.c
parent413bf7b083884ea490e327167399411a91eb341b (diff)
downloadsrc-b1cbddaf5d12e17a58e3bc72942079e0921bbcee.tar.gz
src-b1cbddaf5d12e17a58e3bc72942079e0921bbcee.zip
Fix a regression in r321608.
On i386 with CPUID but without SSE2, set lfence_works to LMB_NONE instead of looping. Reported and tested by: Andre Albsmeier <andre@fbsd.e4m.org> Sponsored by: The FreeBSD Foundation MFC after: 3 days
Notes
Notes: svn path=/head/; revision=322456
Diffstat (limited to 'lib/libc/x86/sys/__vdso_gettc.c')
-rw-r--r--lib/libc/x86/sys/__vdso_gettc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c
index 4ada5e7eac14..ef2ca69edf7a 100644
--- a/lib/libc/x86/sys/__vdso_gettc.c
+++ b/lib/libc/x86/sys/__vdso_gettc.c
@@ -101,6 +101,7 @@ init_fence(void)
#if defined(__i386__)
u_int cpuid_supported, p[4];
+ lfence_works = LMB_NONE;
__asm __volatile(
" pushfl\n"
" popl %%eax\n"
@@ -121,8 +122,7 @@ init_fence(void)
cpuidp(0x1, p);
if ((p[3] & CPUID_SSE2) != 0)
lfence_works = select_lmb();
- } else
- lfence_works = LMB_NONE;
+ }
#elif defined(__amd64__)
lfence_works = select_lmb();
#else