tree b92a5c0c287c9a115a43b85f55a818996df5e319
parent 5c53ff088cb76dca52bdf2ef36ea63147763f9ea
author Nicolas Pitre <[EMAIL PROTECTED]> Thu, 01 Sep 2005 12:48:47 +0100
committer Russell King <[EMAIL PROTECTED]> Thu, 01 Sep 2005 12:48:47 +0100

[ARM] 2863/1: clarify comment in PXA2xx and SA1x00 timer code

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre <[EMAIL PROTECTED]>
Signed-off-by: Russell King <[EMAIL PROTECTED]>

 arch/arm/mach-pxa/time.c    |    7 ++++---
 arch/arm/mach-sa1100/time.c |   17 ++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -91,9 +91,10 @@ pxa_timer_interrupt(int irq, void *dev_i
 
        /* 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
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -70,15 +70,6 @@ static unsigned long sa1100_gettimeoffse
        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)
 {
@@ -86,6 +77,14 @@ sa1100_timer_interrupt(int irq, void *de
 
        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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to