Date: Sat, 17 Feb 2024 21:32:54 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c254bc21dde6 - stable/14 - LinuxKPI: Add some header pollution and dummy headers Message-ID: <202402172132.41HLWsir020580@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c254bc21dde603b86f602257710da07e22bb6c07 commit c254bc21dde603b86f602257710da07e22bb6c07 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-12-24 08:19:58 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-02-17 20:58:37 +0000 LinuxKPI: Add some header pollution and dummy headers required by recent drm-kmod to be succesfully compiled. Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz Obtained from: OpenBSD (partially) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42798 (cherry picked from commit 1bce29bcf121c1e16205fabb100f798d88f757c1) --- .../linuxkpi/common/include/linux/irqdomain.h | 10 +++++++ sys/compat/linuxkpi/common/include/linux/kobject.h | 3 ++ sys/compat/linuxkpi/common/include/linux/of.h | 33 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/shmem_fs.h | 3 ++ .../include/{linux/irqdomain.h => asm/neon.h} | 0 .../linuxkpi/dummy/include/linux/dev_printk.h | 0 .../linuxkpi/dummy/include/linux/device/bus.h | 0 sys/compat/linuxkpi/dummy/include/linux/mei_aux.h | 0 sys/compat/linuxkpi/dummy/include/linux/prandom.h | 0 sys/compat/linuxkpi/dummy/include/linux/sysfb.h | 0 .../linuxkpi/dummy/include/video/nomodeset.h | 0 11 files changed, 49 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/irqdomain.h b/sys/compat/linuxkpi/common/include/linux/irqdomain.h new file mode 100644 index 000000000000..c7788e51cc89 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/irqdomain.h @@ -0,0 +1,10 @@ +/* Public domain. */ + +#ifndef _LINUXKPI_LINUX_IRQDOMAIN_H +#define _LINUXKPI_LINUX_IRQDOMAIN_H + +#include <linux/mutex.h> +#include <linux/of.h> +#include <linux/radix-tree.h> + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h index 06d71faaa873..7aeab3cf05a7 100644 --- a/sys/compat/linuxkpi/common/include/linux/kobject.h +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h @@ -35,6 +35,9 @@ #include <linux/kref.h> #include <linux/list.h> #include <linux/slab.h> +#include <linux/spinlock.h> +#include <linux/wait.h> +#include <linux/workqueue.h> struct kobject; struct sysctl_oid; diff --git a/sys/compat/linuxkpi/common/include/linux/of.h b/sys/compat/linuxkpi/common/include/linux/of.h new file mode 100644 index 000000000000..fb4554a8ddbc --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/of.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Serenity Cyber Security, LLC. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_OF_H +#define _LINUXKPI_LINUX_OF_H + +#include <linux/kobject.h> + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h index d373cfa1d611..efa2c855fe7d 100644 --- a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h +++ b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h @@ -29,7 +29,10 @@ #ifndef _LINUXKPI_LINUX_SHMEM_FS_H_ #define _LINUXKPI_LINUX_SHMEM_FS_H_ +#include <linux/file.h> +#include <linux/mempolicy.h> #include <linux/pagemap.h> +#include <linux/swap.h> /* Shared memory support */ struct page *linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, diff --git a/sys/compat/linuxkpi/dummy/include/linux/irqdomain.h b/sys/compat/linuxkpi/dummy/include/asm/neon.h similarity index 100% rename from sys/compat/linuxkpi/dummy/include/linux/irqdomain.h rename to sys/compat/linuxkpi/dummy/include/asm/neon.h diff --git a/sys/compat/linuxkpi/dummy/include/linux/dev_printk.h b/sys/compat/linuxkpi/dummy/include/linux/dev_printk.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/device/bus.h b/sys/compat/linuxkpi/dummy/include/linux/device/bus.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/mei_aux.h b/sys/compat/linuxkpi/dummy/include/linux/mei_aux.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/prandom.h b/sys/compat/linuxkpi/dummy/include/linux/prandom.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/sysfb.h b/sys/compat/linuxkpi/dummy/include/linux/sysfb.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/video/nomodeset.h b/sys/compat/linuxkpi/dummy/include/video/nomodeset.h new file mode 100644 index 000000000000..e69de29bb2d1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402172132.41HLWsir020580>