git: 086cfe4df8ab - main - linuxkpi: Add spin_trylock_irqsave() macro
Neel Chauhan
nc at FreeBSD.org
Thu Jul 15 14:54:14 UTC 2021
The branch main has been updated by nc (ports committer):
URL: https://cgit.FreeBSD.org/src/commit/?id=086cfe4df8ab237f0cf156e95d36657250931981
commit 086cfe4df8ab237f0cf156e95d36657250931981
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-15 14:52:42 +0000
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
---
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 46b1f8b9a180..56eaecfb4cd6 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