]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix build with DRM and INVARIANTS enabled.
authorjhb <jhb@FreeBSD.org>
Tue, 13 Aug 2019 21:15:59 +0000 (21:15 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 13 Aug 2019 21:15:59 +0000 (21:15 +0000)
commitd093f3cf9534e01dcb95aa1169b343ba98a0816d
tree5190a97c7635164d7beb590dfa01c97df30a108f
parentbcd2f1418a59a2f126e12c9b70eb391ded7d006c
Fix build with DRM and INVARIANTS enabled.

The DRM drivers use the lockdep assertion macros with spinlock_t locks
which are backed by mutexes, not sx locks.  This causes compile
failures since you can't use sx_assert with a mutex.  Instead, change
the lockdep macros to use lock_class methods.  This works by assuming
that each LinuxKPI locking primitive embeds a FreeBSD lock as its
first structure and uses a cast to get to the underlying 'struct
lock_object'.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20992
sys/compat/linuxkpi/common/include/linux/lockdep.h