Module Name:    src
Committed By:   riastradh
Date:           Sun Jul 17 17:04:02 UTC 2022

Modified Files:
        src/sys/external/bsd/drm2/include/linux: ww_mutex.h

Log Message:
linux/ww_mutex: Make wwm_debug member unconditional.

This way LOCKDEBUG doesn't change any structure sizes.  Shuffle
members around to make better use of padding, on both LP32 and LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/include/linux/ww_mutex.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/ww_mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.14 src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.15
--- src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.14	Sun Dec 19 10:38:14 2021
+++ src/sys/external/bsd/drm2/include/linux/ww_mutex.h	Sun Jul 17 17:04:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ww_mutex.h,v 1.14 2021/12/19 10:38:14 riastradh Exp $	*/
+/*	$NetBSD: ww_mutex.h,v 1.15 2022/07/17 17:04:02 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -58,13 +58,16 @@ struct ww_acquire_ctx {
 	struct rb_node	wwx_rb_node;
 };
 
+enum ww_mutex_state {
+	WW_UNLOCKED,	/* nobody owns it */
+	WW_OWNED,	/* owned by a lwp without a context */
+	WW_CTX,		/* owned by a context */
+	WW_WANTOWN,	/* owned by ctx, waiters w/o ctx waiting */
+};
+
 struct ww_mutex {
-	enum ww_mutex_state {
-		WW_UNLOCKED,	/* nobody owns it */
-		WW_OWNED,	/* owned by a lwp without a context */
-		WW_CTX,		/* owned by a context */
-		WW_WANTOWN,	/* owned by ctx, waiters w/o ctx waiting */
-	}			wwm_state;
+	uint8_t			wwm_state;
+	bool			wwm_debug;
 	union {
 		struct lwp		*owner;
 		struct ww_acquire_ctx	*ctx;
@@ -77,9 +80,6 @@ struct ww_mutex {
 	struct ww_class		*wwm_class;
 	struct rb_tree		wwm_waiters;
 	kcondvar_t		wwm_cv;
-#ifdef LOCKDEBUG
-	bool			wwm_debug;
-#endif
 };
 
 /* XXX Make the nm output a little more greppable...  */

Reply via email to