Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Aug 2025 12:36:02 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: d17bfb237065 - main - linuxkpi: Include <linux/spinlock.h> from <linux/refcount.h>
Message-ID:  <202508091236.579Ca2Dx020728@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=d17bfb237065587c72db05a5bafc6bcab1206cb9

commit d17bfb237065587c72db05a5bafc6bcab1206cb9
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-06-22 09:55:57 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2025-08-09 12:26:25 +0000

    linuxkpi: Include <linux/spinlock.h> from <linux/refcount.h>
    
    The <linux/refcount.h> header uses the `spinlock_t` type and some
    consumers in the DRM drivers don't include <linux/spinlock.h> directly
    or indirectly. This led to compilation errors because the type was
    undefined.
    
    On Linux, <linux/refcount.h> includes <linux/spinlock_type.h> as a
    comparision.
    
    Reviewed by:    emaste, manu
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D50994
---
 sys/compat/linuxkpi/common/include/linux/refcount.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/refcount.h b/sys/compat/linuxkpi/common/include/linux/refcount.h
index 02a7eda3f4a9..46e501a65396 100644
--- a/sys/compat/linuxkpi/common/include/linux/refcount.h
+++ b/sys/compat/linuxkpi/common/include/linux/refcount.h
@@ -30,6 +30,7 @@
 #define _LINUXKPI_LINUX_REFCOUNT_H
 
 #include <linux/atomic.h>
+#include <linux/spinlock.h>
 
 typedef atomic_t refcount_t;
 



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