aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-06-30 04:55:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 14:25:38 -0400
commit30df49191cf8c7a3d86ccea956ba0de911c1dc36 (patch)
tree015e377c4475e56558de5bc9352d880e79efe6a1
parent572e614750c3ed27da1ec6b75dc486066a11fffd (diff)
[PATCH] uml: remove unneeded time definitions
Remove um_time() and um_stime() syscalls since they are identical to system-wide ones. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/kernel/time_kern.c22
-rw-r--r--arch/um/sys-i386/sys_call_table.S2
-rw-r--r--arch/um/sys-x86_64/syscall_table.c6
3 files changed, 0 insertions, 30 deletions
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
index 08dd727e79e..820fa3615a3 100644
--- a/arch/um/kernel/time_kern.c
+++ b/arch/um/kernel/time_kern.c
@@ -142,16 +142,6 @@ irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
142 return IRQ_HANDLED; 142 return IRQ_HANDLED;
143} 143}
144 144
145long um_time(int __user *tloc)
146{
147 long ret = get_time() / NSEC_PER_SEC;
148
149 if((tloc != NULL) && put_user(ret, tloc))
150 return -EFAULT;
151
152 return ret;
153}
154
155void do_gettimeofday(struct timeval *tv) 145void do_gettimeofday(struct timeval *tv)
156{ 146{
157 unsigned long long nsecs = get_time(); 147 unsigned long long nsecs = get_time();
@@ -180,18 +170,6 @@ static inline void set_time(unsigned long long nsecs)
180 clock_was_set(); 170 clock_was_set();
181} 171}
182 172
183long um_stime(int __user *tptr)
184{
185 int value;
186
187 if (get_user(value, tptr))
188 return -EFAULT;
189
190 set_time((unsigned long long) value * NSEC_PER_SEC);
191
192 return 0;
193}
194
195int do_settimeofday(struct timespec *tv) 173int do_settimeofday(struct timespec *tv)
196{ 174{
197 set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec); 175 set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec);
diff --git a/arch/um/sys-i386/sys_call_table.S b/arch/um/sys-i386/sys_call_table.S
index 1ff61474b25..2497554b7b9 100644
--- a/arch/um/sys-i386/sys_call_table.S
+++ b/arch/um/sys-i386/sys_call_table.S
@@ -7,8 +7,6 @@
7#define sys_vm86old sys_ni_syscall 7#define sys_vm86old sys_ni_syscall
8#define sys_vm86 sys_ni_syscall 8#define sys_vm86 sys_ni_syscall
9 9
10#define sys_stime um_stime
11#define sys_time um_time
12#define old_mmap old_mmap_i386 10#define old_mmap old_mmap_i386
13 11
14#include "../../i386/kernel/syscall_table.S" 12#include "../../i386/kernel/syscall_table.S"
diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86_64/syscall_table.c
index 34b2e842864..3c4318165de 100644
--- a/arch/um/sys-x86_64/syscall_table.c
+++ b/arch/um/sys-x86_64/syscall_table.c
@@ -20,12 +20,6 @@
20/*#define sys_set_thread_area sys_ni_syscall 20/*#define sys_set_thread_area sys_ni_syscall
21#define sys_get_thread_area sys_ni_syscall*/ 21#define sys_get_thread_area sys_ni_syscall*/
22 22
23/* For __NR_time. The x86-64 name hopefully will change from sys_time64 to
24 * sys_time (since the current situation is bogus). I've sent a patch to cleanup
25 * this. Remove below the obsoleted line. */
26#define sys_time64 um_time
27#define sys_time um_time
28
29/* On UML we call it this way ("old" means it's not mmap2) */ 23/* On UML we call it this way ("old" means it's not mmap2) */
30#define sys_mmap old_mmap 24#define sys_mmap old_mmap
31/* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick. 25/* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick.