Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat Add fadvise64 and fadvise64_64 syscalls to compat...
details: https://anonhg.NetBSD.org/src/rev/b499e298eb20
branches: trunk
changeset: 765567:b499e298eb20
user: alnsn <alnsn%NetBSD.org@localhost>
date: Mon May 30 17:50:31 2011 +0000
description:
Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.
diffstat:
sys/compat/linux/arch/alpha/linux_syscall.h | 7 +-
sys/compat/linux/arch/alpha/linux_syscallargs.h | 14 +++-
sys/compat/linux/arch/alpha/linux_syscalls.c | 8 +-
sys/compat/linux/arch/alpha/linux_sysent.c | 10 +-
sys/compat/linux/arch/alpha/syscalls.master | 5 +-
sys/compat/linux/arch/amd64/linux_commons.c | 5 +-
sys/compat/linux/arch/amd64/linux_syscall.h | 5 +-
sys/compat/linux/arch/amd64/linux_syscallargs.h | 12 ++-
sys/compat/linux/arch/amd64/linux_syscalls.c | 6 +-
sys/compat/linux/arch/amd64/linux_sysent.c | 8 +-
sys/compat/linux/arch/amd64/syscalls.master | 5 +-
sys/compat/linux/arch/arm/linux_commons.c | 5 +-
sys/compat/linux/arch/arm/linux_syscall.h | 7 +-
sys/compat/linux/arch/arm/linux_syscallargs.h | 14 +++-
sys/compat/linux/arch/arm/linux_syscalls.c | 8 +-
sys/compat/linux/arch/arm/linux_sysent.c | 10 +-
sys/compat/linux/arch/arm/syscalls.master | 5 +-
sys/compat/linux/arch/i386/linux_commons.c | 6 +-
sys/compat/linux/arch/i386/linux_syscall.h | 8 +-
sys/compat/linux/arch/i386/linux_syscallargs.h | 22 +++++-
sys/compat/linux/arch/i386/linux_syscalls.c | 8 +-
sys/compat/linux/arch/i386/linux_sysent.c | 12 +-
sys/compat/linux/arch/i386/syscalls.master | 8 +-
sys/compat/linux/arch/m68k/files.linux_m68k | 4 +-
sys/compat/linux/arch/m68k/linux_syscall.h | 10 ++-
sys/compat/linux/arch/m68k/linux_syscallargs.h | 24 +++++-
sys/compat/linux/arch/m68k/linux_syscalls.c | 10 +-
sys/compat/linux/arch/m68k/linux_sysent.c | 14 +-
sys/compat/linux/arch/m68k/syscalls.master | 8 +-
sys/compat/linux/arch/mips/files.linux_mips | 3 +-
sys/compat/linux/arch/mips/linux_syscall.h | 7 +-
sys/compat/linux/arch/mips/linux_syscallargs.h | 14 +++-
sys/compat/linux/arch/mips/linux_syscalls.c | 8 +-
sys/compat/linux/arch/mips/linux_sysent.c | 10 +-
sys/compat/linux/arch/mips/syscalls.master | 5 +-
sys/compat/linux/arch/powerpc/files.linux_powerpc | 4 +-
sys/compat/linux/arch/powerpc/linux_syscall.h | 10 ++-
sys/compat/linux/arch/powerpc/linux_syscallargs.h | 24 +++++-
sys/compat/linux/arch/powerpc/linux_syscalls.c | 10 +-
sys/compat/linux/arch/powerpc/linux_sysent.c | 14 +-
sys/compat/linux/arch/powerpc/syscalls.master | 8 +-
sys/compat/linux/common/linux_fadvise64.c | 82 +++++++++++++++++++++
sys/compat/linux/common/linux_fadvise64_64.c | 77 +++++++++++++++++++
sys/compat/linux/common/linux_misc.h | 8 +-
sys/compat/linux32/arch/amd64/linux32_syscall.h | 8 +-
sys/compat/linux32/arch/amd64/linux32_syscallargs.h | 25 ++++++-
sys/compat/linux32/arch/amd64/linux32_syscalls.c | 8 +-
sys/compat/linux32/arch/amd64/linux32_sysent.c | 12 +-
sys/compat/linux32/arch/amd64/syscalls.master | 8 +-
sys/compat/linux32/common/linux32_fcntl.c | 48 +++++++++++-
50 files changed, 525 insertions(+), 136 deletions(-)
diffs (truncated from 1744 to 300 lines):
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/alpha/linux_syscall.h
--- a/sys/compat/linux/arch/alpha/linux_syscall.h Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/alpha/linux_syscall.h Mon May 30 17:50:31 2011 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.79 2011/04/15 13:07:37 he Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.80 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.72 2010/07/07 01:30:33 chs Exp
+ * created from NetBSD: syscalls.master,v 1.73 2011/04/15 13:04:52 he Exp
*/
#ifndef _LINUX_SYS_SYSCALL_H_
@@ -573,6 +573,9 @@
/* syscall: "set_tid_address" ret: "int" args: "int *" */
#define LINUX_SYS_set_tid_address 411
+/* syscall: "fadvise64" ret: "int" args: "int" "linux_off_t" "size_t" "int" */
+#define LINUX_SYS_fadvise64 413
+
/* syscall: "clock_settime" ret: "int" args: "clockid_t" "struct linux_timespec *" */
#define LINUX_SYS_clock_settime 419
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/alpha/linux_syscallargs.h
--- a/sys/compat/linux/arch/alpha/linux_syscallargs.h Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/alpha/linux_syscallargs.h Mon May 30 17:50:31 2011 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.78 2011/04/15 13:07:37 he Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.79 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.72 2010/07/07 01:30:33 chs Exp
+ * created from NetBSD: syscalls.master,v 1.73 2011/04/15 13:04:52 he Exp
*/
#ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -930,6 +930,14 @@
};
check_syscall_args(linux_sys_set_tid_address)
+struct linux_sys_fadvise64_args {
+ syscallarg(int) fd;
+ syscallarg(linux_off_t) offset;
+ syscallarg(size_t) len;
+ syscallarg(int) advice;
+};
+check_syscall_args(linux_sys_fadvise64)
+
struct linux_sys_clock_settime_args {
syscallarg(clockid_t) which;
syscallarg(struct linux_timespec *) tp;
@@ -1401,6 +1409,8 @@
int linux_sys_set_tid_address(struct lwp *, const struct linux_sys_set_tid_address_args *, register_t *);
+int linux_sys_fadvise64(struct lwp *, const struct linux_sys_fadvise64_args *, register_t *);
+
int linux_sys_clock_settime(struct lwp *, const struct linux_sys_clock_settime_args *, register_t *);
int linux_sys_clock_gettime(struct lwp *, const struct linux_sys_clock_gettime_args *, register_t *);
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/alpha/linux_syscalls.c
--- a/sys/compat/linux/arch/alpha/linux_syscalls.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/alpha/linux_syscalls.c Mon May 30 17:50:31 2011 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_syscalls.c,v 1.80 2011/04/15 13:07:37 he Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.81 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.72 2010/07/07 01:30:33 chs Exp
+ * created from NetBSD: syscalls.master,v 1.73 2011/04/15 13:04:52 he Exp
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.80 2011/04/15 13:07:37 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.81 2011/05/30 17:50:31 alnsn Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@@ -469,7 +469,7 @@
/* 410 */ "#410 (unimplemented remap_file_pages)",
/* 411 */ "set_tid_address",
/* 412 */ "#412 (unimplemented restart_syscall)",
- /* 413 */ "#413 (unimplemented fadvise64)",
+ /* 413 */ "fadvise64",
/* 414 */ "#414 (unimplemented timer_create)",
/* 415 */ "#415 (unimplemented timer_settime)",
/* 416 */ "#416 (unimplemented timer_gettime)",
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/alpha/linux_sysent.c
--- a/sys/compat/linux/arch/alpha/linux_sysent.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/alpha/linux_sysent.c Mon May 30 17:50:31 2011 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.79 2011/04/15 13:07:37 he Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.80 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.72 2010/07/07 01:30:33 chs Exp
+ * created from NetBSD: syscalls.master,v 1.73 2011/04/15 13:04:52 he Exp
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.79 2011/04/15 13:07:37 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.80 2011/05/30 17:50:31 alnsn Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -896,8 +896,8 @@
(sy_call_t *)linux_sys_set_tid_address },/* 411 = set_tid_address */
{ 0, 0, 0,
linux_sys_nosys }, /* 412 = unimplemented restart_syscall */
- { 0, 0, 0,
- linux_sys_nosys }, /* 413 = unimplemented fadvise64 */
+ { ns(struct linux_sys_fadvise64_args), 0,
+ (sy_call_t *)linux_sys_fadvise64 }, /* 413 = fadvise64 */
{ 0, 0, 0,
linux_sys_nosys }, /* 414 = unimplemented timer_create */
{ 0, 0, 0,
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/alpha/syscalls.master
--- a/sys/compat/linux/arch/alpha/syscalls.master Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/alpha/syscalls.master Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.73 2011/04/15 13:04:52 he Exp $
+ $NetBSD: syscalls.master,v 1.74 2011/05/30 17:50:31 alnsn Exp $
;
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -652,7 +652,8 @@
410 UNIMPL remap_file_pages
411 STD { int|linux_sys||set_tid_address(int *tid); }
412 UNIMPL restart_syscall
-413 UNIMPL fadvise64
+413 STD { int|linux_sys||fadvise64(int fd, \
+ linux_off_t offset, size_t len, int advice); }
414 UNIMPL timer_create
415 UNIMPL timer_settime
416 UNIMPL timer_gettime
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/linux_commons.c
--- a/sys/compat/linux/arch/amd64/linux_commons.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/linux_commons.c Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_commons.c,v 1.10 2010/03/02 15:46:19 pooka Exp $ */
+/* $NetBSD: linux_commons.c,v 1.11 2011/05/30 17:50:31 alnsn Exp $ */
/*
* This file includes C files from the common
@@ -13,7 +13,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: linux_commons.c,v 1.10 2010/03/02 15:46:19 pooka Exp $");
+__KERNEL_RCSID(1, "$NetBSD: linux_commons.c,v 1.11 2011/05/30 17:50:31 alnsn Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -36,3 +36,4 @@
#include "../../common/linux_misc_notalpha.c"
#include "../../common/linux_sig_notalpha.c"
#include "../../common/linux_futex.c"
+#include "../../common/linux_fadvise64.c"
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/linux_syscall.h
--- a/sys/compat/linux/arch/amd64/linux_syscall.h Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/linux_syscall.h Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.39 2011/04/10 15:49:23 christos Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.40 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call numbers.
@@ -567,6 +567,9 @@
/* syscall: "set_tid_address" ret: "int" args: "int *" */
#define LINUX_SYS_set_tid_address 218
+/* syscall: "fadvise64" ret: "int" args: "int" "linux_off_t" "size_t" "int" */
+#define LINUX_SYS_fadvise64 221
+
/* syscall: "clock_settime" ret: "int" args: "clockid_t" "struct linux_timespec *" */
#define LINUX_SYS_clock_settime 227
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/linux_syscallargs.h
--- a/sys/compat/linux/arch/amd64/linux_syscallargs.h Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/linux_syscallargs.h Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.39 2011/04/10 15:49:23 christos Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.40 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call argument lists.
@@ -839,6 +839,14 @@
};
check_syscall_args(linux_sys_set_tid_address)
+struct linux_sys_fadvise64_args {
+ syscallarg(int) fd;
+ syscallarg(linux_off_t) offset;
+ syscallarg(size_t) len;
+ syscallarg(int) advice;
+};
+check_syscall_args(linux_sys_fadvise64)
+
struct linux_sys_clock_settime_args {
syscallarg(clockid_t) which;
syscallarg(struct linux_timespec *) tp;
@@ -1282,6 +1290,8 @@
int linux_sys_set_tid_address(struct lwp *, const struct linux_sys_set_tid_address_args *, register_t *);
+int linux_sys_fadvise64(struct lwp *, const struct linux_sys_fadvise64_args *, register_t *);
+
int linux_sys_clock_settime(struct lwp *, const struct linux_sys_clock_settime_args *, register_t *);
int linux_sys_clock_gettime(struct lwp *, const struct linux_sys_clock_gettime_args *, register_t *);
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/linux_syscalls.c
--- a/sys/compat/linux/arch/amd64/linux_syscalls.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/linux_syscalls.c Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.39 2011/04/10 15:49:23 christos Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.40 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call names.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.39 2011/04/10 15:49:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.40 2011/05/30 17:50:31 alnsn Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@@ -285,7 +285,7 @@
/* 218 */ "set_tid_address",
/* 219 */ "#219 (unimplemented restart_syscall)",
/* 220 */ "#220 (unimplemented semtimedop)",
- /* 221 */ "#221 (unimplemented fadvise64)",
+ /* 221 */ "fadvise64",
/* 222 */ "#222 (unimplemented timer_create)",
/* 223 */ "#223 (unimplemented timer_settime)",
/* 224 */ "#224 (unimplemented timer_gettime)",
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/linux_sysent.c
--- a/sys/compat/linux/arch/amd64/linux_sysent.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/linux_sysent.c Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.39 2011/04/10 15:49:23 christos Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.40 2011/05/30 17:50:31 alnsn Exp $ */
/*
* System call switch table.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.39 2011/04/10 15:49:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.40 2011/05/30 17:50:31 alnsn Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -520,8 +520,8 @@
linux_sys_nosys }, /* 219 = unimplemented restart_syscall */
{ 0, 0, 0,
linux_sys_nosys }, /* 220 = unimplemented semtimedop */
- { 0, 0, 0,
- linux_sys_nosys }, /* 221 = unimplemented fadvise64 */
+ { ns(struct linux_sys_fadvise64_args), 0,
+ (sy_call_t *)linux_sys_fadvise64 }, /* 221 = fadvise64 */
{ 0, 0, 0,
linux_sys_nosys }, /* 222 = unimplemented timer_create */
{ 0, 0, 0,
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/amd64/syscalls.master
--- a/sys/compat/linux/arch/amd64/syscalls.master Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/amd64/syscalls.master Mon May 30 17:50:31 2011 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.36 2011/04/10 15:48:46 christos Exp $
+ $NetBSD: syscalls.master,v 1.37 2011/05/30 17:50:31 alnsn Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -417,7 +417,8 @@
218 STD { int|linux_sys||set_tid_address(int *tid); }
219 UNIMPL restart_syscall
220 UNIMPL semtimedop
-221 UNIMPL fadvise64
+221 STD { int|linux_sys||fadvise64(int fd, \
+ linux_off_t offset, size_t len, int advice); }
222 UNIMPL timer_create
223 UNIMPL timer_settime
224 UNIMPL timer_gettime
diff -r bb9c1d50fca8 -r b499e298eb20 sys/compat/linux/arch/arm/linux_commons.c
--- a/sys/compat/linux/arch/arm/linux_commons.c Mon May 30 16:30:01 2011 +0000
+++ b/sys/compat/linux/arch/arm/linux_commons.c Mon May 30 17:50:31 2011 +0000
Home |
Main Index |
Thread Index |
Old Index