git: f3e25c012d9e - main - linuxkpi: Add `local_irq_{save,restore}()`

From: Jean-Sébastien Pédron <dumbbell_at_FreeBSD.org>
Date: Mon, 07 Apr 2025 18:01:29 UTC
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