summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-11-12 12:35:50 +0000
committerad <ad@NetBSD.org>2008-11-12 12:35:50 +0000
commit0efea177e37295fed654875d875160c47500d6bd (patch)
tree9d0589344a5d07b9a511a2e81ebbd701744d03b5 /sys/compat/linux
parent0f81d3e0a26c2833cd085c472a4a77c325486b75 (diff)
Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/arch/i386/linux_machdep.h4
-rw-r--r--sys/compat/linux/arch/mips/linux_machdep.h4
-rw-r--r--sys/compat/linux/arch/mips/linux_ptrace.c5
-rw-r--r--sys/compat/linux/arch/powerpc/linux_machdep.h4
-rw-r--r--sys/compat/linux/arch/powerpc/linux_ptrace.c6
-rw-r--r--sys/compat/linux/common/linux_misc.c19
-rw-r--r--sys/compat/linux/common/linux_sysctl.c7
7 files changed, 16 insertions, 33 deletions
diff --git a/sys/compat/linux/arch/i386/linux_machdep.h b/sys/compat/linux/arch/i386/linux_machdep.h
index 68c8a32a4f6..de0c2e98f9b 100644
--- a/sys/compat/linux/arch/i386/linux_machdep.h
+++ b/sys/compat/linux/arch/i386/linux_machdep.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.h,v 1.35 2008/10/26 17:57:49 christos Exp $ */
+/* $NetBSD: linux_machdep.h,v 1.36 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -280,7 +280,7 @@ struct linux_desc_struct {
#define LINUX_VMWARE_LAST 237
/*
- * Range of ioctls to just pass on, so that LKMs (like VMWare) can
+ * Range of ioctls to just pass on, so that modules (like VMWare) can
* handle them.
*/
#define LINUX_IOCTL_MIN_PASS LINUX_VMWARE_NONE
diff --git a/sys/compat/linux/arch/mips/linux_machdep.h b/sys/compat/linux/arch/mips/linux_machdep.h
index 092903b22e2..3b526b3397b 100644
--- a/sys/compat/linux/arch/mips/linux_machdep.h
+++ b/sys/compat/linux/arch/mips/linux_machdep.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.h,v 1.9 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_machdep.h,v 1.10 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@@ -186,7 +186,7 @@ struct linux_rt_sigframe
#define LINUX_VMWARE_LAST 237
/*
- * Range of ioctls to just pass on, so that LKMs (like VMWare) can
+ * Range of ioctls to just pass on, so that modules (like VMWare) can
* handle them.
*
* From Linux's include/linux/vt.h
diff --git a/sys/compat/linux/arch/mips/linux_ptrace.c b/sys/compat/linux/arch/mips/linux_ptrace.c
index 9f3a3a7dccf..239126f1fe1 100644
--- a/sys/compat/linux/arch/mips/linux_ptrace.c
+++ b/sys/compat/linux/arch/mips/linux_ptrace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ptrace.c,v 1.8 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_ptrace.c,v 1.9 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -30,8 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.8 2008/04/28 20:23:43 martin Exp $");
-#include "opt_ptrace.h"
+__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.9 2008/11/12 12:36:10 ad Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
diff --git a/sys/compat/linux/arch/powerpc/linux_machdep.h b/sys/compat/linux/arch/powerpc/linux_machdep.h
index ec3a6d32fe4..a11f93f3baf 100644
--- a/sys/compat/linux/arch/powerpc/linux_machdep.h
+++ b/sys/compat/linux/arch/powerpc/linux_machdep.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.h,v 1.9 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_machdep.h,v 1.10 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@@ -214,7 +214,7 @@ struct linux_rt_sigframe
#define LINUX_VMWARE_LAST 237
/*
- * Range of ioctls to just pass on, so that LKMs (like VMWare) can
+ * Range of ioctls to just pass on, so that modules (like VMWare) can
* handle them.
*
* From Linux's include/linux/vt.h
diff --git a/sys/compat/linux/arch/powerpc/linux_ptrace.c b/sys/compat/linux/arch/powerpc/linux_ptrace.c
index 2ec4a79bf55..b007fe6b0d5 100644
--- a/sys/compat/linux/arch/powerpc/linux_ptrace.c
+++ b/sys/compat/linux/arch/powerpc/linux_ptrace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ptrace.c,v 1.19 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_ptrace.c,v 1.20 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -30,9 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.19 2008/04/28 20:23:43 martin Exp $");
-
-#include "opt_ptrace.h"
+__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.20 2008/11/12 12:36:10 ad Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c
index 7712e6697fa..3c2b96b0341 100644
--- a/sys/compat/linux/common/linux_misc.c
+++ b/sys/compat/linux/common/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $ */
+/* $NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,11 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $");
-
-#if defined(_KERNEL_OPT)
-#include "opt_ptrace.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1040,13 +1036,9 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
syscallarg(T) addr;
syscallarg(T) data;
} */
-#if defined(PTRACE) || defined(_LKM)
const int *ptr;
int request;
int error;
-#ifdef _LKM
-#define sys_ptrace (*sysent[SYS_ptrace].sy_call)
-#endif
ptr = linux_ptrace_request_map;
request = SCARG(uap, request);
@@ -1062,13 +1054,13 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
/*
* Linux ptrace(PTRACE_CONT, pid, 0, 0) means actually
* to continue where the process left off previously.
- * The same thing is achieved by addr == (void *) 1
+ * The same thing is achieved by addr == (void *) 1
* on NetBSD, so rewrite 'addr' appropriately.
*/
if (request == LINUX_PTRACE_CONT && SCARG(uap, addr)==0)
SCARG(&pta, addr) = (void *) 1;
- error = sys_ptrace(l, &pta, retval);
+ error = sysent[SYS_ptrace].sy_call(l, &pta, retval);
if (error)
return error;
switch (request) {
@@ -1088,9 +1080,6 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
ptr++;
return LINUX_SYS_PTRACE_ARCH(l, uap, retval);
-#else
- return ENOSYS;
-#endif /* PTRACE || _LKM */
}
int
diff --git a/sys/compat/linux/common/linux_sysctl.c b/sys/compat/linux/common/linux_sysctl.c
index 4c990917642..23839c1775d 100644
--- a/sys/compat/linux/common/linux_sysctl.c
+++ b/sys/compat/linux/common/linux_sysctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysctl.c,v 1.36 2008/06/18 12:24:18 tsutsui Exp $ */
+/* $NetBSD: linux_sysctl.c,v 1.37 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.36 2008/06/18 12:24:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.37 2008/11/12 12:36:10 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,9 +65,6 @@ char linux_release[128] = "2.0.38";
char linux_version[128] = "#0 Sun Nov 11 11:11:11 MET 2000";
#endif
-#ifndef _LKM
-static
-#endif
struct sysctlnode linux_sysctl_root = {
.sysctl_flags = SYSCTL_VERSION|
CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE,