Date: Sun, 18 Jul 2021 01:09:18 GMT From: Neel Chauhan <nc@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 511bbe502e8a - stable/13 - linuxkpi: Add spin_trylock_irqsave() macro Message-ID: <202107180109.16I19IXt090976@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@FreeBSD.org> AuthorDate: 2021-07-15 14:52:42 +0000 Commit: Neel Chauhan <nc@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; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107180109.16I19IXt090976>