Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192226
b: refs/heads/master
c: f5c9c9b
h: refs/heads/master
v: v3
  • Loading branch information
John Stultz authored and Thomas Gleixner committed Mar 13, 2010
1 parent 4a1513c commit d26860d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eff8a5c1d3a1de7a2d173e0effc6cc9bcbb5177
refs/heads/master: f5c9c9be267f73eda6a668ac81ddde56ed7fa793
2 changes: 1 addition & 1 deletion trunk/arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ config ARCH_USES_GETTIMEOFFSET

config GENERIC_CMOS_UPDATE
bool
default y if SPARC64
default y

config GENERIC_CLOCKEVENTS
bool
Expand Down
18 changes: 5 additions & 13 deletions trunk/arch/sparc/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ __volatile__ unsigned int *master_l10_counter;

u32 (*do_arch_gettimeoffset)(void);

int update_persistent_clock(struct timespec now)
{
return set_rtc_mmss(now.tv_sec);
}

/*
* timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick
Expand All @@ -87,9 +92,6 @@ u32 (*do_arch_gettimeoffset)(void);

static irqreturn_t timer_interrupt(int dummy, void *dev_id)
{
/* last time the cmos clock got updated */
static long last_rtc_update;

#ifndef CONFIG_SMP
profile_tick(CPU_PROFILING);
#endif
Expand All @@ -101,16 +103,6 @@ static irqreturn_t timer_interrupt(int dummy, void *dev_id)

do_timer(1);

/* Determine when to update the Mostek clock. */
if (ntp_synced() &&
xtime.tv_sec > last_rtc_update + 660 &&
(xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
(xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
if (set_rtc_mmss(xtime.tv_sec) == 0)
last_rtc_update = xtime.tv_sec;
else
last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
}
write_sequnlock(&xtime_lock);

#ifndef CONFIG_SMP
Expand Down

0 comments on commit d26860d

Please sign in to comment.