]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r351003:
authorHans Petter Selasky <hselasky@FreeBSD.org>
Mon, 18 May 2020 09:21:45 +0000 (09:21 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Mon, 18 May 2020 09:21:45 +0000 (09:21 +0000)
commit8f111962d3c2734f81a2ce1f26b9386c98c27a8f
tree8f6577ccea15f387eadc6bfd0aab184a036a6cba
parenta44cdcd8afb6df0a815958d1702f9af550dcf094
MFC r351003:
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
Differential Revision: https://reviews.freebsd.org/D20992
sys/compat/linuxkpi/common/include/linux/lockdep.h