Remove unused local gettimeofday functions, now that we are using
GENERIC_TIME.
Signed-off-by: Thomas Chou <[EMAIL PROTECTED]>
---
linux-2.6.x/arch/nios2nommu/Kconfig | 4 ++
linux-2.6.x/arch/nios2nommu/kernel/time.c | 66 -----------------------------
2 files changed, 4 insertions(+), 66 deletions(-)
diff --git a/linux-2.6.x/arch/nios2nommu/Kconfig
b/linux-2.6.x/arch/nios2nommu/Kconfig
index 6fb16a7..0b45af8 100644
--- a/linux-2.6.x/arch/nios2nommu/Kconfig
+++ b/linux-2.6.x/arch/nios2nommu/Kconfig
@@ -44,6 +44,10 @@ config GENERIC_CALIBRATE_DELAY
bool
default y
+config GENERIC_TIME
+ bool
+ default y
+
config HOTPLUG_CPU
bool
default n
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/time.c
b/linux-2.6.x/arch/nios2nommu/kernel/time.c
index 3b536fe..a98e22e 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/time.c
+++ b/linux-2.6.x/arch/nios2nommu/kernel/time.c
@@ -151,69 +151,3 @@ void __init time_init(void)
+ np_timercontrol_cont_mask
+ np_timercontrol_ito_mask;
}
-
-/*
- * This version of gettimeofday has near microsecond resolution.
- */
-void do_gettimeofday(struct timeval *tv)
-{
- unsigned long flags;
- unsigned long seq;
- unsigned long usec, sec;
-
- do {
- seq = read_seqbegin_irqsave(&xtime_lock, flags);
- usec = gettimeoffset();
- sec = xtime.tv_sec;
- usec += (xtime.tv_nsec / 1000);
- } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
-
- while (usec >= 1000000) {
- usec -= 1000000;
- sec++;
- }
-
- tv->tv_sec = sec;
- tv->tv_usec = usec;
-}
-EXPORT_SYMBOL(do_gettimeofday);
-
-int do_settimeofday(struct timespec *tv)
-{
- time_t wtm_sec, sec = tv->tv_sec;
- long wtm_nsec, nsec = tv->tv_nsec;
-
- if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
- return -EINVAL;
-
- write_seqlock_irq(&xtime_lock);
- /*
- * This is revolting. We need to set "xtime" correctly. However, the
- * value in this location is the value at the last tick.
- * Discover what correction gettimeofday() would have
- * made, and then undo it!
- */
- nsec -= gettimeoffset() * NSEC_PER_USEC;
-
- wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
- wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
-
- set_normalized_timespec(&xtime, sec, nsec);
- set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
-
- ntp_clear();
-
- write_sequnlock_irq(&xtime_lock);
- clock_was_set();
-
- return 0;
-}
-EXPORT_SYMBOL(do_settimeofday);
-
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
- return (unsigned long long)jiffies * (1000000000 / HZ);
-}
--
1.5.3.3
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev