linuxkpi: Add spin_trylock_irqsave() macro

This is needed by the drm-kmod 5.6 update.

Reviewed by:		hselasky
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D30706
This commit is contained in:
Neel Chauhan 2021-07-15 07:52:42 -07:00
parent 65788dae31
commit 086cfe4df8

View File

@ -104,6 +104,11 @@ typedef struct {
#define spin_trylock_irq(_l) \
spin_trylock(_l)
#define spin_trylock_irqsave(_l, flags) ({ \
(flags) = 0; \
spin_trylock(_l); \
})
#define spin_lock_nested(_l, _n) do { \
if (SPIN_SKIP()) \
break; \