From: Andrew Morton Cc: Jeff Dike Cc: Jeff Dike Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- arch/um/os-Linux/time.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff -puN arch/um/os-Linux/time.c~uml-tickless-support-fix arch/um/os-Linux/time.c --- a/arch/um/os-Linux/time.c~uml-tickless-support-fix +++ a/arch/um/os-Linux/time.c @@ -41,18 +41,6 @@ int timer_one_shot(int ticks) return 0; } -static inline unsigned long long tv_to_nsec(struct timeval *tv) -{ - /* Cast tv->tv_sec to a long long in order to force this whole - * calculation to 64 bits. Otherwise, we'll get a negative - * 32-bit number getting cast to a very large 64-bit number on - * return. - */ - - return ((unsigned long long) tv->tv_sec) * BILLION + - tv->tv_usec * 1000; -} - void disable_timer(void) { struct itimerval disable = ((struct itimerval) { { 0, 0 }, { 0, 0 }}); @@ -101,7 +89,7 @@ unsigned long long os_nsecs(void) struct timeval tv; gettimeofday(&tv, NULL); - return tv_to_nsec(&tv); + return timeval_to_ns(&tv); } void idle_sleep(int secs) _