Commit 139a6134 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: remove obsolete system calls

This patch is for removing obsolete system calls from m32r kernel, such as 
old_mmap and old_select.

	* arch/m32r/kernel/entry.S:
	- Remove an obsolete system call, old_mmap, from the syscall table.

	* arch/m32r/kernel/sys_m32r.c:
	- Remove obsolete system calls, old_mmap() and old_select().
	- do_mmap2() is renamed to sys_mmap2().

* CAUTION (for m32r users):
  The new kernel (applied this patch) does not have a backward
  compatibility. The new kernel and old library pair does not work.

  So, those who want to use the new kernel must use a new version of 
  glibc (the GNU C library), which uses the "mmap2(_NR_mmap2)" syscall
  for __mmap() instead of the "old_mmap(__NR_mmap)".

  The new glibc package, libc6_2.3.2.ds1-16.0.3_m32r.deb, is provided
  on the following site, please apt-get/download it and upgrade.

    http://debian.linux-m32r.org/dists/03_cambrian/main/binary-m32r/Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4aecda30
......@@ -3,6 +3,7 @@
*
* Copyright (c) 2001, 2002 Hirokazu Takata, Hitoshi Yamamoto, H. Kondo
* Copyright (c) 2003 Hitoshi Yamamoto
* Copyright (c) 2004 Hirokazu Takata <takata at linux-m32r.org>
*
* Taken from i386 version.
* Copyright (C) 1991, 1992 Linus Torvalds
......@@ -798,7 +799,7 @@ ENTRY(sys_call_table)
.long sys_swapon
.long sys_reboot
.long old_readdir
.long old_mmap /* 90 */
.long sys_ni_syscall /* 90 - old_mmap syscall holder */
.long sys_munmap
.long sys_truncate
.long sys_ftruncate
......
......@@ -7,8 +7,6 @@
* Taken from i386 version.
*/
/* $Id$ */
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
......@@ -88,10 +86,9 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2,
return error;
}
static inline long do_mmap2(
unsigned long addr, unsigned long len,
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
int fd, unsigned long pgoff)
unsigned long fd, unsigned long pgoff)
{
int error = -EBADF;
struct file *file = NULL;
......@@ -113,62 +110,6 @@ static inline long do_mmap2(
return error;
}
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
return do_mmap2(addr, len, prot, flags, fd, pgoff);
}
/*
* Perform the select(nd, in, out, ex, tv) and mmap() system
* calls. Linux/M32R didn't use to be able to handle more than
* 4 system call parameters, so these system calls used a memory
* block for parameter passing..
*/
struct mmap_arg_struct {
unsigned long addr;
unsigned long len;
unsigned long prot;
unsigned long flags;
unsigned long fd;
unsigned long offset;
};
asmlinkage int old_mmap(struct mmap_arg_struct *arg)
{
struct mmap_arg_struct a;
int err = -EFAULT;
if (copy_from_user(&a, arg, sizeof(a)))
goto out;
err = -EINVAL;
if (a.offset & ~PAGE_MASK)
goto out;
err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd,
a.offset>>PAGE_SHIFT);
out:
return err;
}
struct sel_arg_struct {
unsigned long n;
fd_set __user *inp, *outp, *exp;
struct timeval __user *tvp;
};
asmlinkage int old_select(struct sel_arg_struct __user *arg)
{
struct sel_arg_struct a;
if (copy_from_user(&a, arg, sizeof(a)))
return -EFAULT;
/* sys_select() does the appropriate kernel locking */
return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
}
/*
* sys_ipc() is the de-multiplexer for the SysV IPC calls..
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment