diff options
Diffstat (limited to 'arch/sparc/kernel/time_32.c')
-rw-r--r-- | arch/sparc/kernel/time_32.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 0d4c09b15efc..4453003032b5 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -78,6 +78,11 @@ __volatile__ unsigned int *master_l10_counter; | |||
78 | 78 | ||
79 | u32 (*do_arch_gettimeoffset)(void); | 79 | u32 (*do_arch_gettimeoffset)(void); |
80 | 80 | ||
81 | int update_persistent_clock(struct timespec now) | ||
82 | { | ||
83 | return set_rtc_mmss(now.tv_sec); | ||
84 | } | ||
85 | |||
81 | /* | 86 | /* |
82 | * timer_interrupt() needs to keep up the real-time clock, | 87 | * timer_interrupt() needs to keep up the real-time clock, |
83 | * as well as call the "do_timer()" routine every clocktick | 88 | * as well as call the "do_timer()" routine every clocktick |
@@ -87,9 +92,6 @@ u32 (*do_arch_gettimeoffset)(void); | |||
87 | 92 | ||
88 | static irqreturn_t timer_interrupt(int dummy, void *dev_id) | 93 | static irqreturn_t timer_interrupt(int dummy, void *dev_id) |
89 | { | 94 | { |
90 | /* last time the cmos clock got updated */ | ||
91 | static long last_rtc_update; | ||
92 | |||
93 | #ifndef CONFIG_SMP | 95 | #ifndef CONFIG_SMP |
94 | profile_tick(CPU_PROFILING); | 96 | profile_tick(CPU_PROFILING); |
95 | #endif | 97 | #endif |
@@ -101,16 +103,6 @@ static irqreturn_t timer_interrupt(int dummy, void *dev_id) | |||
101 | 103 | ||
102 | do_timer(1); | 104 | do_timer(1); |
103 | 105 | ||
104 | /* Determine when to update the Mostek clock. */ | ||
105 | if (ntp_synced() && | ||
106 | xtime.tv_sec > last_rtc_update + 660 && | ||
107 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | ||
108 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { | ||
109 | if (set_rtc_mmss(xtime.tv_sec) == 0) | ||
110 | last_rtc_update = xtime.tv_sec; | ||
111 | else | ||
112 | last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ | ||
113 | } | ||
114 | write_sequnlock(&xtime_lock); | 106 | write_sequnlock(&xtime_lock); |
115 | 107 | ||
116 | #ifndef CONFIG_SMP | 108 | #ifndef CONFIG_SMP |