diff options
author | dchagin <dchagin@FreeBSD.org> | 2015-05-24 15:51:18 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2015-05-24 15:51:18 +0000 |
commit | b08f3f43f9e901fdb2194f84eb02093e60665bab (patch) | |
tree | 727bdc803a1ee883bef970562b3e0caca6592c53 /sys/i386/linux/linux_sysvec.c | |
parent | 9e320cb48d75ef7f8df929c2aaccdfb1a4a3fc0b (diff) | |
download | FreeBSD-src-b08f3f43f9e901fdb2194f84eb02093e60665bab.zip FreeBSD-src-b08f3f43f9e901fdb2194f84eb02093e60665bab.tar.gz |
Introduce a new module linux_common.ko which is intended for the
following primary purposes:
1. Remove the dependency of linsysfs and linprocfs modules from linux.ko,
which will be architecture specific on amd64.
2. Incorporate into linux_common.ko general code for platforms on which
we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit).
3. Move malloc(9) declaration to linux_common.ko, to enable getting memory
usage statistics properly.
Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c
and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko.
Temporarily remove dtrace garbage from linux_mib.c and linux_util.c
Differential Revision: https://reviews.freebsd.org/D1072
In collaboration with: Vassilis Laganakos.
Reviewed by: trasz
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 85bdde7..6bda0aa 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/syscallsubr.h> +#include <sys/sysctl.h> #include <sys/sysent.h> #include <sys/sysproto.h> #include <sys/vnode.h> @@ -75,14 +76,19 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux, 1); -MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures"); - #if BYTE_ORDER == LITTLE_ENDIAN #define SHELLMAGIC 0x2123 /* #! */ #else #define SHELLMAGIC 0x2321 #endif +#if defined(DEBUG) +SYSCTL_PROC(_compat_linux, OID_AUTO, debug, + CTLTYPE_STRING | CTLFLAG_RW, + 0, 0, linux_sysctl_debug, "A", + "Linux debugging control"); +#endif + /* * Allow the sendsig functions to use the ldebug() facility * even though they are not syscalls themselves. Map them @@ -103,7 +109,6 @@ extern char _binary_linux_locore_o_end; extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); -SET_DECLARE(linux_device_handler_set, struct linux_device_handler); static int linux_fixup(register_t **stack_base, struct image_params *iparams); @@ -1129,7 +1134,6 @@ linux_elf_modevent(module_t mod, int type, void *data) Elf32_Brandinfo **brandinfo; int error; struct linux_ioctl_handler **lihp; - struct linux_device_handler **ldhp; error = 0; @@ -1142,8 +1146,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); - SET_FOREACH(ldhp, linux_device_handler_set) - linux_device_register_handler(*ldhp); LIST_INIT(&futex_list); mtx_init(&futex_mtx, "ftllk", NULL, MTX_DEF); linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit, @@ -1176,8 +1178,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); - SET_FOREACH(ldhp, linux_device_handler_set) - linux_device_unregister_handler(*ldhp); mtx_destroy(&futex_mtx); EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); |