Date: Sun, 13 Aug 2017 14:42:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322456 - head/lib/libc/x86/sys Message-ID: <201708131442.v7DEgNmP011868@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Aug 13 14:42:23 2017 New Revision: 322456 URL: https://svnweb.freebsd.org/changeset/base/322456 Log: 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 Modified: head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/x86/sys/__vdso_gettc.c Sun Aug 13 14:36:10 2017 (r322455) +++ head/lib/libc/x86/sys/__vdso_gettc.c Sun Aug 13 14:42:23 2017 (r322456) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708131442.v7DEgNmP011868>