aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-03-19 20:29:29 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-03-21 21:16:43 +0000
commit1d18872c2519d7ca726ddc49735180ab1d8916e0 (patch)
tree7cdbe95d6fa7d21223c7a17ea9faaaa64eba0573
parent2ce06d25431a6c96ef5719165cb73e138a0ed89c (diff)
LinuxKPI: add supporting #includes
Compiling drm-kmod on !X86 does not include asm/smp.h which includes preempt.h on FreeBSD. In order to compile drm-kmod on other architectures add the secondary #includes for preempt.h to spinlock.h and hardirq.h (which now also gets included from highmem.h) to connect the #include chain. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 279864 Reviewed by: jhibbits, emaste Differential Revision: https://reviews.freebsd.org/D55974
-rw-r--r--sys/compat/linuxkpi/common/include/linux/hardirq.h1
-rw-r--r--sys/compat/linuxkpi/common/include/linux/highmem.h1
-rw-r--r--sys/compat/linuxkpi/common/include/linux/spinlock.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/hardirq.h b/sys/compat/linuxkpi/common/include/linux/hardirq.h
index f79451dd0d35..c6cbf1a34f14 100644
--- a/sys/compat/linuxkpi/common/include/linux/hardirq.h
+++ b/sys/compat/linuxkpi/common/include/linux/hardirq.h
@@ -31,6 +31,7 @@
#include <linux/types.h>
#include <linux/lockdep.h>
+#include <linux/preempt.h>
#include <sys/param.h>
#include <sys/bus.h>
diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h
index 58a9cdcdf60f..dc1c4fe2f299 100644
--- a/sys/compat/linuxkpi/common/include/linux/highmem.h
+++ b/sys/compat/linuxkpi/common/include/linux/highmem.h
@@ -45,6 +45,7 @@
#include <linux/mm.h>
#include <linux/page.h>
+#include <linux/hardirq.h>
#define PageHighMem(p) (0)
diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
index 63dc343d1461..a786cbab5e13 100644
--- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
@@ -41,6 +41,7 @@
#include <linux/rwlock.h>
#include <linux/bottom_half.h>
#include <linux/lockdep.h>
+#include <linux/preempt.h>
typedef struct mtx spinlock_t;