diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 00:12:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 00:12:00 -0500 |
commit | 4657190936883adb819f81957e33439d447c0035 (patch) | |
tree | 70342debfb779a8b10d2a8440c1ae99593806079 /arch/mips/kernel | |
parent | 4a29cc2e503b33a1e96db4c3f9a94165f153f259 (diff) | |
parent | 9007c9a2b03ea325ee593a161dbf01dbb8222d7e (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] SB1: Check for -mno-sched-prolog if building corelis debug kernel.
[MIPS] Sibyte: Fix race in sb1250_gettimeoffset().
[MIPS] Sibyte: Fix interrupt timer off by one bug.
[MIPS] Sibyte: Fix M_SCD_TIMER_INIT and M_SCD_TIMER_CNT wrong field width.
[MIPS] Protect more of timer_interrupt() by xtime_lock.
[MIPS] Work around bad code generation for <asm/io.h>.
[MIPS] Simple patch to power off DBAU1200
[MIPS] Fix DBAu1550 software power off.
[MIPS] local_r4k_flush_cache_page fix
[MIPS] SB1: Fix interrupt disable hazard.
[MIPS] Get rid of the IP22-specific code in arclib.
Update MAINTAINERS entry for MIPS.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 42c94c771afb..51273b7297a7 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -424,6 +424,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
424 | unsigned long j; | 424 | unsigned long j; |
425 | unsigned int count; | 425 | unsigned int count; |
426 | 426 | ||
427 | write_seqlock(&xtime_lock); | ||
428 | |||
427 | count = mips_hpt_read(); | 429 | count = mips_hpt_read(); |
428 | mips_timer_ack(); | 430 | mips_timer_ack(); |
429 | 431 | ||
@@ -441,7 +443,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
441 | * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be | 443 | * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be |
442 | * called as close as possible to 500 ms before the new second starts. | 444 | * called as close as possible to 500 ms before the new second starts. |
443 | */ | 445 | */ |
444 | write_seqlock(&xtime_lock); | ||
445 | if (ntp_synced() && | 446 | if (ntp_synced() && |
446 | xtime.tv_sec > last_rtc_update + 660 && | 447 | xtime.tv_sec > last_rtc_update + 660 && |
447 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | 448 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && |
@@ -453,7 +454,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
453 | last_rtc_update = xtime.tv_sec - 600; | 454 | last_rtc_update = xtime.tv_sec - 600; |
454 | } | 455 | } |
455 | } | 456 | } |
456 | write_sequnlock(&xtime_lock); | ||
457 | 457 | ||
458 | /* | 458 | /* |
459 | * If jiffies has overflown in this timer_interrupt, we must | 459 | * If jiffies has overflown in this timer_interrupt, we must |
@@ -496,6 +496,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
496 | } | 496 | } |
497 | } | 497 | } |
498 | 498 | ||
499 | write_sequnlock(&xtime_lock); | ||
500 | |||
499 | /* | 501 | /* |
500 | * In UP mode, we call local_timer_interrupt() to do profiling | 502 | * In UP mode, we call local_timer_interrupt() to do profiling |
501 | * and process accouting. | 503 | * and process accouting. |