HomeFreeBSD

Fix build with DRM and INVARIANTS enabled.

Description

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

Details

Committed
jhbAug 13 2019, 9:15 PM
Reviewer
hselasky
Differential Revision
D20992: Fix build with DRM and INVARIANTS enabled.
Parents
rS351002: Clarify comment that describes how the FS_METACKHASH is managed.
Branches
Unknown
Tags
Unknown