git: 511bbe502e8a - stable/13 - linuxkpi: Add spin_trylock_irqsave() macro
Neel Chauhan
nc at FreeBSD.org
Sun Jul 18 01:09:18 UTC 2021
The branch stable/13 has been updated by nc (ports committer):
URL: https://cgit.FreeBSD.org/src/commit/?id=511bbe502e8ad50d7b22feefec7bb7c2534a7571
commit 511bbe502e8ad50d7b22feefec7bb7c2534a7571
Author: Neel Chauhan <nc at FreeBSD.org>
AuthorDate: 2021-07-15 14:52:42 +0000
Commit: Neel Chauhan <nc at FreeBSD.org>
CommitDate: 2021-07-18 01:08:06 +0000
linuxkpi: Add spin_trylock_irqsave() macro
This is needed by the drm-kmod 5.6 update.
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30706
(cherry picked from commit 086cfe4df8ab237f0cf156e95d36657250931981)
---
sys/compat/linuxkpi/common/include/linux/spinlock.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
index ca51fd23434c..458d8d9f8da9 100644
--- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
@@ -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; \
More information about the dev-commits-src-all
mailing list