Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Redo previous using COHERENCY_UNIT.



details:   https://anonhg.NetBSD.org/src/rev/57695fe97823
branches:  trunk
changeset: 467060:57695fe97823
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Jan 12 13:37:26 2020 +0000

description:
Redo previous using COHERENCY_UNIT.

diffstat:

 sys/sys/param.h |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r cbbca59d0123 -r 57695fe97823 sys/sys/param.h
--- a/sys/sys/param.h   Sun Jan 12 13:29:24 2020 +0000
+++ b/sys/sys/param.h   Sun Jan 12 13:37:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.638 2020/01/12 13:19:32 ad Exp $   */
+/*     $NetBSD: param.h,v 1.639 2020/01/12 13:37:26 ad Exp $   */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -527,13 +527,16 @@
 #endif /* _KERNEL */
 
 /*
- * Minimum alignment of "struct lwp" needed by the architecture.
- * This counts when packing a lock byte into a word alongside a
- * pointer to an LWP.  We need a minimum of 32, but go with 64
- * to match the cache line size.
+ * Minimum alignment of "struct lwp" needed by the architecture.  This
+ * counts when packing a lock byte into a word alongside a pointer to an
+ * LWP.  We need a minimum of 32, but go with the cache line size.
  */
 #ifndef MIN_LWP_ALIGNMENT
-#define        MIN_LWP_ALIGNMENT       64
+# if COHERENCY_UNIT > 32
+#  define MIN_LWP_ALIGNMENT    COHERENCY_UNIT
+# else
+#  define MIN_LWP_ALIGNMENT    32
+# endif
 #endif
 #endif /* !__ASSEMBLER__ */
 



Home | Main Index | Thread Index | Old Index