aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r--arch/cris/kernel/irq.c1
-rw-r--r--arch/cris/kernel/module.c1
-rw-r--r--arch/cris/kernel/profile.c1
-rw-r--r--arch/cris/kernel/sys_cris.c96
4 files changed, 2 insertions, 97 deletions
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 6d7b9eda4036..469f7f9d62e0 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -29,7 +29,6 @@
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/timex.h> 31#include <linux/timex.h>
32#include <linux/slab.h>
33#include <linux/random.h> 32#include <linux/random.h>
34#include <linux/init.h> 33#include <linux/init.h>
35#include <linux/seq_file.h> 34#include <linux/seq_file.h>
diff --git a/arch/cris/kernel/module.c b/arch/cris/kernel/module.c
index abc13e368b90..bcd502f74cda 100644
--- a/arch/cris/kernel/module.c
+++ b/arch/cris/kernel/module.c
@@ -21,6 +21,7 @@
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/string.h> 22#include <linux/string.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/slab.h>
24 25
25#if 0 26#if 0
26#define DEBUGP printk 27#define DEBUGP printk
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index 9aa571169bcc..b917549a7d94 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -2,6 +2,7 @@
2#include <linux/errno.h> 2#include <linux/errno.h>
3#include <linux/kernel.h> 3#include <linux/kernel.h>
4#include <linux/proc_fs.h> 4#include <linux/proc_fs.h>
5#include <linux/slab.h>
5#include <linux/types.h> 6#include <linux/types.h>
6#include <asm/ptrace.h> 7#include <asm/ptrace.h>
7#include <asm/uaccess.h> 8#include <asm/uaccess.h>
diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c
index c2bbb1ac98a9..7aa036ec78ff 100644
--- a/arch/cris/kernel/sys_cris.c
+++ b/arch/cris/kernel/sys_cris.c
@@ -26,24 +26,6 @@
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <asm/segment.h> 27#include <asm/segment.h>
28 28
29asmlinkage unsigned long old_mmap(unsigned long __user *args)
30{
31 unsigned long buffer[6];
32 int err = -EFAULT;
33
34 if (copy_from_user(&buffer, args, sizeof(buffer)))
35 goto out;
36
37 err = -EINVAL;
38 if (buffer[5] & ~PAGE_MASK) /* verify that offset is on page boundary */
39 goto out;
40
41 err = sys_mmap_pgoff(buffer[0], buffer[1], buffer[2], buffer[3],
42 buffer[4], buffer[5] >> PAGE_SHIFT);
43out:
44 return err;
45}
46
47asmlinkage long 29asmlinkage long
48sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 30sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
49 unsigned long flags, unsigned long fd, unsigned long pgoff) 31 unsigned long flags, unsigned long fd, unsigned long pgoff)
@@ -51,81 +33,3 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
51 /* bug(?): 8Kb pages here */ 33 /* bug(?): 8Kb pages here */
52 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); 34 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
53} 35}
54
55/*
56 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
57 *
58 * This is really horribly ugly. (same as arch/i386)
59 */
60
61asmlinkage int sys_ipc (uint call, int first, int second,
62 int third, void __user *ptr, long fifth)
63{
64 int version, ret;
65
66 version = call >> 16; /* hack for backward compatibility */
67 call &= 0xffff;
68
69 switch (call) {
70 case SEMOP:
71 return sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL);
72 case SEMTIMEDOP:
73 return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
74 (const struct timespec __user *)fifth);
75
76 case SEMGET:
77 return sys_semget (first, second, third);
78 case SEMCTL: {
79 union semun fourth;
80 if (!ptr)
81 return -EINVAL;
82 if (get_user(fourth.__pad, (void * __user *) ptr))
83 return -EFAULT;
84 return sys_semctl (first, second, third, fourth);
85 }
86
87 case MSGSND:
88 return sys_msgsnd (first, (struct msgbuf __user *) ptr,
89 second, third);
90 case MSGRCV:
91 switch (version) {
92 case 0: {
93 struct ipc_kludge tmp;
94 if (!ptr)
95 return -EINVAL;
96
97 if (copy_from_user(&tmp,
98 (struct ipc_kludge __user *) ptr,
99 sizeof (tmp)))
100 return -EFAULT;
101 return sys_msgrcv (first, tmp.msgp, second,
102 tmp.msgtyp, third);
103 }
104 default:
105 return sys_msgrcv (first,
106 (struct msgbuf __user *) ptr,
107 second, fifth, third);
108 }
109 case MSGGET:
110 return sys_msgget ((key_t) first, second);
111 case MSGCTL:
112 return sys_msgctl (first, second, (struct msqid_ds __user *) ptr);
113
114 case SHMAT: {
115 ulong raddr;
116 ret = do_shmat (first, (char __user *) ptr, second, &raddr);
117 if (ret)
118 return ret;
119 return put_user (raddr, (ulong __user *) third);
120 }
121 case SHMDT:
122 return sys_shmdt ((char __user *)ptr);
123 case SHMGET:
124 return sys_shmget (first, second, third);
125 case SHMCTL:
126 return sys_shmctl (first, second,
127 (struct shmid_ds __user *) ptr);
128 default:
129 return -ENOSYS;
130 }
131}