Author: cognet Date: Fri Feb 16 17:50:06 2018 New Revision: 329388 URL: https://svnweb.freebsd.org/changeset/base/329388
Log: Define CK_MD_TSO for the relevant arches (i386, amd64 and sparc64). Defaulting to CK_MD_RMO has the unfortunate side effect of generating memory barriers that are useless on those arches, and the even more unfortunate side effect of generating lfence/sfence/mfence on i386, even if older CPUs don't support it. This should fix the panic reported when using IPFW on a Pentium 3. Note that mfence and sfence might still be used in a few case, but that shouldn't happen in FreeBSD right now, and should be fixed upstream first. MFC after: 1 week Modified: head/sys/contrib/ck/include/ck_md.h Modified: head/sys/contrib/ck/include/ck_md.h ============================================================================== --- head/sys/contrib/ck/include/ck_md.h Fri Feb 16 17:46:07 2018 (r329387) +++ head/sys/contrib/ck/include/ck_md.h Fri Feb 16 17:50:06 2018 (r329388) @@ -53,10 +53,6 @@ #define CK_PR_DISABLE_DOUBLE #endif /* CK_PR_DISABLE_DOUBLE */ -#ifndef CK_MD_RMO -#define CK_MD_RMO -#endif /* CK_MD_RMO */ - #define CK_VERSION "0.6.0" #define CK_GIT_SHA "" @@ -65,11 +61,20 @@ */ #if defined(__i386__) && !defined(__x86__) #define __x86__ +#define CK_MD_TSO +#elif defined(__amd64__) +#define CK_MD_TSO #elif defined(__sparc64__) && !defined(__sparcv9__) #define __sparcv9__ +#define CK_MD_TSO #elif defined(__powerpc64__) && !defined(__ppc64__) #define __ppc64__ #elif defined(__powerpc__) && !defined(__ppc__) #define __ppc__ #endif + +#if !defined(CK_MD_RMO) && !defined(CK_MD_TSO) && !defined(CK_MD_PSO) +#define CK_MD_RMO +#endif + #endif /* CK_MD_H */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"