Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2025 18:01:29 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f3e25c012d9e - main - linuxkpi: Add `local_irq_{save,restore}()`
Message-ID:  <202504071801.537I1TPB028317@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=f3e25c012d9e3326bee57a4b61e716f244e0a32f

commit f3e25c012d9e3326bee57a4b61e716f244e0a32f
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-02-28 21:59:47 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2025-04-07 17:36:12 +0000

    linuxkpi: Add `local_irq_{save,restore}()`
    
    These are no-ops.
    
    The i915 DRM driver started to use it in Linux 6.8.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D49380
---
 sys/compat/linuxkpi/common/include/linux/spinlock.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
index 2992e41c9c02..dc10b0457153 100644
--- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
@@ -154,6 +154,14 @@ typedef struct mtx spinlock_t;
 	mtx_assert(_l, MA_OWNED);		\
 } while (0)
 
+#define	local_irq_save(flags) do {		\
+	(flags) = 0;				\
+} while (0)
+
+#define	local_irq_restore(flags) do {		\
+	(void)(flags);				\
+} while (0)
+
 #define	atomic_dec_and_lock_irqsave(cnt, lock, flags) \
 	_atomic_dec_and_lock_irqsave(cnt, lock, &(flags))
 static inline int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504071801.537I1TPB028317>