Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux Make Linux ww_mutex use ...
details: https://anonhg.NetBSD.org/src/rev/4064b97f3660
branches: trunk
changeset: 330796:4064b97f3660
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jul 22 02:38:31 2014 +0000
description:
Make Linux ww_mutex use a spin lock inside, not an adaptive lock.
diffstat:
sys/external/bsd/drm2/include/linux/ww_mutex.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 084f8d574fc4 -r 4064b97f3660 sys/external/bsd/drm2/include/linux/ww_mutex.h
--- a/sys/external/bsd/drm2/include/linux/ww_mutex.h Tue Jul 22 02:21:50 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/ww_mutex.h Tue Jul 22 02:38:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ww_mutex.h,v 1.1 2014/07/16 20:59:58 riastradh Exp $ */
+/* $NetBSD: ww_mutex.h,v 1.2 2014/07/22 02:38:31 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -144,7 +144,11 @@
ww_mutex_init(struct ww_mutex *mutex, struct ww_class *class)
{
- mutex_init(&mutex->wwm_lock, MUTEX_DEFAULT, IPL_NONE);
+ /*
+ * XXX Apparently Linux takes these with spin locks held. That
+ * strikes me as a bad idea, but so it is...
+ */
+ mutex_init(&mutex->wwm_lock, MUTEX_DEFAULT, IPL_VM);
mutex->wwm_state = WW_UNLOCKED;
mutex->wwm_class = class;
rb_tree_init(&mutex->wwm_waiters, &ww_acquire_ctx_rb_ops);
Home |
Main Index |
Thread Index |
Old Index