diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2020-12-06 10:58:55 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2020-12-06 10:58:55 +0000 |
commit | 77fb6b6644446beb0ea45085b953f464c729c049 (patch) | |
tree | 908fcb7b3107f0b8adc9c8c6aae0b91434c54512 | |
parent | 60e2a0d9a4b21978f60c5b608a458f3427b390c8 (diff) |
Move V4L feature declarations and DTrace provider definitions from
linux_common.c to linux_util.c so they become available on i386.
linux_common.c defines the linux_common kernel module but this module does
not exist on i386 and linux_common.c is not included in the linux module.
linux_util.c is included in the linux_common module on amd64 and the linux
module on i386.
Remove linux_common.c from files.i386 again. It was added recently in
r367433 when the DTrace provider definitions were moved.
The V4L feature declarations were moved to linux_common in r283423.
Notes
Notes:
svn path=/head/; revision=368384
-rw-r--r-- | sys/compat/linux/linux_common.c | 19 | ||||
-rw-r--r-- | sys/compat/linux/linux_util.c | 18 | ||||
-rw-r--r-- | sys/conf/files.i386 | 1 |
3 files changed, 18 insertions, 20 deletions
diff --git a/sys/compat/linux/linux_common.c b/sys/compat/linux/linux_common.c index 5984b07ef592..5a0ac015ed0e 100644 --- a/sys/compat/linux/linux_common.c +++ b/sys/compat/linux/linux_common.c @@ -36,34 +36,15 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/sx.h> -#include <sys/sysctl.h> #include <compat/linux/linux.h> -#include <compat/linux/linux_dtrace.h> #include <compat/linux/linux_emul.h> #include <compat/linux/linux_ioctl.h> #include <compat/linux/linux_mib.h> #include <compat/linux/linux_util.h> -FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); -FEATURE(linuxulator_v4l2, "V4L2 ioctl wrapper support in the linuxulator"); - MODULE_VERSION(linux_common, 1); -/** - * Special DTrace provider for the linuxulator. - * - * In this file we define the provider for the entire linuxulator. All - * modules (= files of the linuxulator) use it. - * - * We define a different name depending on the emulated bitsize, see - * ../../<ARCH>/linux{,32}/linux.h, e.g.: - * native bitsize = linuxulator - * amd64, 32bit emulation = linuxulator32 - */ -LIN_SDT_PROVIDER_DEFINE(linuxulator); -LIN_SDT_PROVIDER_DEFINE(linuxulator32); - SET_DECLARE(linux_device_handler_set, struct linux_device_handler); TAILQ_HEAD(, linux_ioctl_handler_element) linux_ioctl_handlers = diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 1f6a86a1dc66..8e5462636705 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <machine/stdarg.h> +#include <compat/linux/linux_dtrace.h> #include <compat/linux/linux_mib.h> #include <compat/linux/linux_util.h> @@ -62,6 +63,23 @@ MALLOC_DEFINE(M_EPOLL, "lepoll", "Linux events structures"); MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futex waiting proc"); +FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); +FEATURE(linuxulator_v4l2, "V4L2 ioctl wrapper support in the linuxulator"); + +/** + * Special DTrace provider for the linuxulator. + * + * In this file we define the provider for the entire linuxulator. All + * modules (= files of the linuxulator) use it. + * + * We define a different name depending on the emulated bitsize, see + * ../../<ARCH>/linux{,32}/linux.h, e.g.: + * native bitsize = linuxulator + * amd64, 32bit emulation = linuxulator32 + */ +LIN_SDT_PROVIDER_DEFINE(linuxulator); +LIN_SDT_PROVIDER_DEFINE(linuxulator32); + char linux_emul_path[MAXPATHLEN] = "/compat/linux"; SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN, diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index e668f9ff02d9..bae1a8cde184 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -52,7 +52,6 @@ cddl/dev/dtrace/i386/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/i386/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -compat/linux/linux_common.c optional compat_linux compat/linux/linux_dummy.c optional compat_linux compat/linux/linux_event.c optional compat_linux compat/linux/linux_emul.c optional compat_linux |