Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Mar 2026 21:17:01 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1d18872c2519 - main - LinuxKPI: add supporting #includes
Message-ID:  <69bf0acd.1d947.5350973b@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bz:

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

commit 1d18872c2519d7ca726ddc49735180ab1d8916e0
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-03-19 20:29:29 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-03-21 21:16:43 +0000

    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
---
 sys/compat/linuxkpi/common/include/linux/hardirq.h  | 1 +
 sys/compat/linuxkpi/common/include/linux/highmem.h  | 1 +
 sys/compat/linuxkpi/common/include/linux/spinlock.h | 1 +
 3 files changed, 3 insertions(+)

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;
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69bf0acd.1d947.5350973b>