Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dfa741f146b39eb59ef2094e03f47079ca99eb0
Commit:     8dfa741f146b39eb59ef2094e03f47079ca99eb0
Parent:     622477533d3dc24845c847f386533f3c0e6a1be6
Author:     Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Sun Nov 11 17:33:55 2007 +0000
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Thu Nov 15 23:21:50 2007 +0000

    [MIPS] Sibyte: Stop timers before programming next even.
    
    We have no guarantee by the generic time code that the timer is stopped
    when the ->next_event method is called.  Modifying the Timer Initial Count
    register while the timer is enabled has UNPREDICTABLE effect according to
    the BCM1250/BCM1125/BCM1125H User Manual.  So stop the timer before
    reprogramming.
    
    This is a paranoia fix; no ill effects have been observed previously.
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/kernel/cevt-bcm1480.c |    1 +
 arch/mips/kernel/cevt-sb1250.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
index e54410e..0a57f86 100644
--- a/arch/mips/kernel/cevt-bcm1480.c
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -75,6 +75,7 @@ static int sibyte_next_event(unsigned long delta, struct 
clock_event_device *cd)
        cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
        init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
 
+       __raw_writeq(0, cfg);
        __raw_writeq(delta - 1, init);
        __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
 
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
index 8fbb055..63ac3ad 100644
--- a/arch/mips/kernel/cevt-sb1250.c
+++ b/arch/mips/kernel/cevt-sb1250.c
@@ -73,6 +73,7 @@ static int sibyte_next_event(unsigned long delta, struct 
clock_event_device *cd)
        cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
        init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
 
+       __raw_writeq(0, cfg);
        __raw_writeq(delta - 1, init);
        __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
 
-
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