Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6806
b: refs/heads/master
c: 20e9126
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Pitre authored and Russell King committed Sep 1, 2005
1 parent 5ba1964 commit 3868f1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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: 5c53ff088cb76dca52bdf2ef36ea63147763f9ea
refs/heads/master: 20e912680842504ab4633deaa644c2b855ad3d44
7 changes: 4 additions & 3 deletions trunk/arch/arm/mach-pxa/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)

/* Loop until we get ahead of the free running timer.
* This ensures an exact clock tick count and time accuracy.
* IRQs are disabled inside the loop to ensure coherence between
* lost_ticks (updated in do_timer()) and the match reg value, so we
* can use do_gettimeofday() from interrupt handlers.
* Since IRQs are disabled at this point, coherence between
* lost_ticks(updated in do_timer()) and the match reg value is
* ensured, hence we can use do_gettimeofday() from interrupt
* handlers.
*
* HACK ALERT: it seems that the PXA timer regs aren't updated right
* away in all cases when a write occurs. We therefore compare with
Expand Down
17 changes: 8 additions & 9 deletions trunk/arch/arm/mach-sa1100/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,21 @@ static unsigned long sa1100_gettimeoffset (void)
return usec;
}

/*
* We will be entered with IRQs enabled.
*
* Loop until we get ahead of the free running timer.
* This ensures an exact clock tick count and time accuracy.
* IRQs are disabled inside the loop to ensure coherence between
* lost_ticks (updated in do_timer()) and the match reg value, so we
* can use do_gettimeofday() from interrupt handlers.
*/
static irqreturn_t
sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned int next_match;

write_seqlock(&xtime_lock);

/*
* Loop until we get ahead of the free running timer.
* This ensures an exact clock tick count and time accuracy.
* Since IRQs are disabled at this point, coherence between
* lost_ticks(updated in do_timer()) and the match reg value is
* ensured, hence we can use do_gettimeofday() from interrupt
* handlers.
*/
do {
timer_tick(regs);
OSSR = OSSR_M0; /* Clear match on timer 0 */
Expand Down

0 comments on commit 3868f1a

Please sign in to comment.