From 30df49191cf8c7a3d86ccea956ba0de911c1dc36 Mon Sep 17 00:00:00 2001
From: Jeff Dike <jdike@addtoit.com>
Date: Fri, 30 Jun 2006 01:55:57 -0700
Subject: [PATCH] [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>
---
 arch/um/kernel/time_kern.c         | 22 ----------------------
 arch/um/sys-i386/sys_call_table.S  |  2 --
 arch/um/sys-x86_64/syscall_table.c |  6 ------
 3 files changed, 30 deletions(-)

diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
index 08dd727e79e47..820fa3615a3f7 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)
 	return IRQ_HANDLED;
 }
 
-long um_time(int __user *tloc)
-{
-	long ret = get_time() / NSEC_PER_SEC;
-
-	if((tloc != NULL) && put_user(ret, tloc))
-		return -EFAULT;
-
-	return ret;
-}
-
 void do_gettimeofday(struct timeval *tv)
 {
 	unsigned long long nsecs = get_time();
@@ -180,18 +170,6 @@ static inline void set_time(unsigned long long nsecs)
 	clock_was_set();
 }
 
-long um_stime(int __user *tptr)
-{
-	int value;
-
-	if (get_user(value, tptr))
-                return -EFAULT;
-
-	set_time((unsigned long long) value * NSEC_PER_SEC);
-
-	return 0;
-}
-
 int do_settimeofday(struct timespec *tv)
 {
 	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 1ff61474b25c6..2497554b7b954 100644
--- a/arch/um/sys-i386/sys_call_table.S
+++ b/arch/um/sys-i386/sys_call_table.S
@@ -7,8 +7,6 @@
 #define sys_vm86old sys_ni_syscall
 #define sys_vm86 sys_ni_syscall
 
-#define sys_stime um_stime
-#define sys_time um_time
 #define old_mmap old_mmap_i386
 
 #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 34b2e842864fb..3c4318165de03 100644
--- a/arch/um/sys-x86_64/syscall_table.c
+++ b/arch/um/sys-x86_64/syscall_table.c
@@ -20,12 +20,6 @@
 /*#define sys_set_thread_area sys_ni_syscall
 #define sys_get_thread_area sys_ni_syscall*/
 
-/* For __NR_time. The x86-64 name hopefully will change from sys_time64 to
- * sys_time (since the current situation is bogus). I've sent a patch to cleanup
- * this. Remove below the obsoleted line. */
-#define sys_time64 um_time
-#define sys_time um_time
-
 /* On UML we call it this way ("old" means it's not mmap2) */
 #define sys_mmap old_mmap
 /* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick.
-- 
GitLab