Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 2025 18:47:14 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: c8c32d3e336d - main - linuxkpi: Document why <linux/cpufeaure.h> has an include commentted out
Message-ID:  <202503211847.52LIlEpt027108@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=c8c32d3e336df2bdad254ed8019f8ef976ec9bf4

commit c8c32d3e336df2bdad254ed8019f8ef976ec9bf4
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-03-21 18:33:52 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2025-03-21 18:46:35 +0000

    linuxkpi: Document why <linux/cpufeaure.h> has an include commentted out
    
    <linux/cpufeature.h> on Linux includes <linux/init.h>. We don't have the
    latter on FreeBSD yet, so let's comment this include for now. It is
    still referenced because sometimes, consumers of headers rely
    voluntarily or not on the namespace pollution.
    
    Reported by:    jrtc27
    Approved by:    jrtc27
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D49448
---
 sys/compat/linuxkpi/common/include/linux/cpufeature.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/cpufeature.h b/sys/compat/linuxkpi/common/include/linux/cpufeature.h
index 046fab53d521..746d1a7164a8 100644
--- a/sys/compat/linuxkpi/common/include/linux/cpufeature.h
+++ b/sys/compat/linuxkpi/common/include/linux/cpufeature.h
@@ -30,7 +30,13 @@
 #ifndef	_LINUXKPI_LINUX_CPUFEATURE_H_
 #define	_LINUXKPI_LINUX_CPUFEATURE_H_
 
-// #include <linux/init.h>
+/*
+ * Linux includes the following header. We don't have it on FreeBSD yet, so
+ * let's comment this include for now. It is still referenced here because
+ * sometimes, consumers of headers rely voluntarily or not on the namespace
+ * pollution.
+ */
+/* #include <linux/init.h> */
 #include <linux/mod_devicetable.h>
 #include <asm/cpufeature.h>
 



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