Page MenuHomeFreeBSD

D57571.id.diff
No OneTemporary

D57571.id.diff

Index: sys/compat/linuxkpi/common/include/linux/cpu.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/cpu.h
+++ sys/compat/linuxkpi/common/include/linux/cpu.h
@@ -35,7 +35,9 @@
#include <sys/systm.h>
#include <sys/cpuset.h>
#include <sys/smp.h>
+
#include <linux/compiler.h>
+#include <linux/node.h>
#include <linux/slab.h>
typedef cpuset_t cpumask_t;
Index: sys/compat/linuxkpi/common/include/linux/fs.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/fs.h
+++ sys/compat/linuxkpi/common/include/linux/fs.h
@@ -44,6 +44,7 @@
#include <linux/wait_bit.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
+#include <linux/xarray.h>
struct module;
struct kiocb;
Index: sys/compat/linuxkpi/common/include/linux/node.h
===================================================================
--- /dev/null
+++ sys/compat/linuxkpi/common/include/linux/node.h
@@ -0,0 +1,14 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2026 The FreeBSD Foundation
+ * Copyright (c) 2026 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
+ */
+
+#ifndef _LINUXKPI_LINUX_NODE_H_
+#define _LINUXKPI_LINUX_NODE_H_
+
+#include <linux/device.h>
+#include <linux/list.h>
+
+#endif
Index: sys/compat/linuxkpi/common/include/linux/radix-tree.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/radix-tree.h
+++ sys/compat/linuxkpi/common/include/linux/radix-tree.h
@@ -108,4 +108,16 @@
unsigned int radix_tree_gang_lookup(const struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items);
unsigned int radix_tree_gang_lookup_tag(const struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items, unsigned int tag);
+/*
+ * On Linux, <linux/radix-tress.h> includes <linux/xarray.h>.
+ *
+ * However on FreeBSD, this is the opposite because an xarray is implemented on
+ * top of a radix-tree. Unfortunately, some code relies on the namespace
+ * pollution.
+ *
+ * Therefore we include <linux/xarray.h> here at the end because it depends on
+ * the definitions above.
+ */
+#include <linux/xarray.h>
+
#endif /* _LINUXKPI_LINUX_RADIX_TREE_H_ */
Index: sys/compat/linuxkpi/common/include/linux/stop_machine.h
===================================================================
--- /dev/null
+++ sys/compat/linuxkpi/common/include/linux/stop_machine.h
@@ -0,0 +1,16 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2026 The FreeBSD Foundation
+ * Copyright (c) 2026 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
+ */
+
+#ifndef _LINUXKPI_LINUX_STOP_MACHINE_H_
+#define _LINUXKPI_LINUX_STOP_MACHINE_H_
+
+#include <linux/cpu.h>
+#include <linux/cpumask_types.h>
+#include <linux/smp.h>
+#include <linux/list.h>
+
+#endif

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 14, 3:28 AM (7 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38884432
Default Alt Text
D57571.id.diff (2 KB)

Event Timeline