Date: Thu, 29 Jul 2010 02:13:04 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r210587 - projects/ofed/head/sys/ofed/include/linux Message-ID: <201007290213.o6T2D4go099521@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Thu Jul 29 02:13:04 2010 New Revision: 210587 URL: http://svn.freebsd.org/changeset/base/210587 Log: - Redefine the init routines to use different names for each lock type so witness doesn't panic. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/linux/mutex.h projects/ofed/head/sys/ofed/include/linux/rwlock.h projects/ofed/head/sys/ofed/include/linux/rwsem.h projects/ofed/head/sys/ofed/include/linux/semaphore.h Modified: projects/ofed/head/sys/ofed/include/linux/mutex.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/mutex.h Thu Jul 29 02:12:22 2010 (r210586) +++ projects/ofed/head/sys/ofed/include/linux/mutex.h Thu Jul 29 02:13:04 2010 (r210587) @@ -38,7 +38,8 @@ typedef struct mutex { struct sx sx; } mutex_t; -#define mutex_init(_m) sx_init(&(_m)->sx, "ldev") +#define mutex_init(_m) sx_init_flags(&(_m)->sx, \ + "lnxmtx", SX_NOWITNESS) #define mutex_lock(_m) sx_xlock(&(_m)->sx) #define mutex_lock_nested(_m, _s) mutex_lock(_m) #define mutex_lock_interruptible(_m) ({ mutex_lock((_m)); 0; }) @@ -47,6 +48,6 @@ typedef struct mutex { #define DEFINE_MUTEX(lock) \ mutex_t lock; \ - SX_SYSINIT(lock, &(lock).sx, "ldev") + SX_SYSINIT_FLAGS(lock, &(lock).sx, "lnxmtx", SX_NOWITNESS) #endif /* _LINUX_MUTEX_H_ */ Modified: projects/ofed/head/sys/ofed/include/linux/rwlock.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/rwlock.h Thu Jul 29 02:12:22 2010 (r210586) +++ projects/ofed/head/sys/ofed/include/linux/rwlock.h Thu Jul 29 02:13:04 2010 (r210587) @@ -35,7 +35,7 @@ typedef struct { struct rwlock rw; } rwlock_t; -#define rwlock_init(_l) rw_init(&(_l)->rw, "ldev") +#define rwlock_init(_l) rw_init_flags(&(_l)->rw, "lnxrw", RW_NOWITNESS) #define read_lock(_l) rw_rlock(&(_l)->rw) #define write_lock(_l) rw_wlock(&(_l)->rw) #define read_unlock(_l) rw_runlock(&(_l)->rw) Modified: projects/ofed/head/sys/ofed/include/linux/rwsem.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/rwsem.h Thu Jul 29 02:12:22 2010 (r210586) +++ projects/ofed/head/sys/ofed/include/linux/rwsem.h Thu Jul 29 02:13:04 2010 (r210587) @@ -36,7 +36,8 @@ struct rw_semaphore { struct sx sx; }; -#define init_rwsem(_rw) sx_init(&(_rw)->sx, "ldev") +#define init_rwsem(_rw) sx_init_flags(&(_rw)->sx, \ + "lnxrwsem", SX_NOWITNESS) #define down_write(_rw) sx_xlock(&(_rw)->sx) #define up_write(_rw) sx_xunlock(&(_rw)->sx) #define down_read(_rw) sx_slock(&(_rw)->sx) Modified: projects/ofed/head/sys/ofed/include/linux/semaphore.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/semaphore.h Thu Jul 29 02:12:22 2010 (r210586) +++ projects/ofed/head/sys/ofed/include/linux/semaphore.h Thu Jul 29 02:13:04 2010 (r210587) @@ -36,7 +36,8 @@ struct semaphore { struct sx sx; }; -#define init_MUTEX(_rw) sx_init(&(_rw)->sx, "ldev") +#define init_MUTEX(_rw) sx_init_flags(&(_rw)->sx, \ + "lnxsema", SX_NOWITNESS) #define down(_rw) sx_xlock(&(_rw)->sx) #define down_interruptible(_rw) sx_xlock_sig(&(_rw)->sx) #define down_trylock(_rw) !sx_try_xlock(&(_rw)->sx)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007290213.o6T2D4go099521>