Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=725d7b36c3287217e14cea6fec6c0b897f500a10
Commit:     725d7b36c3287217e14cea6fec6c0b897f500a10
Parent:     84953b39f9b57f89f87b5974c599b8111658f0b6
Author:     Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 28 23:02:37 2007 +0000
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 19:35:35 2007 +0000

    [MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/sgi-ip27/ip27-timer.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index f5dccf0..dc59c3b 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -131,12 +131,12 @@ static struct irq_chip rt_irq_type = {
 static int rt_next_event(unsigned long delta, struct clock_event_device *evt)
 {
        unsigned int cpu = smp_processor_id();
-       int slice = cputoslice(cpu) == 0;
+       int slice putoslice(cpu);
        unsigned long cnt;
 
        cnt = LOCAL_HUB_L(PI_RT_COUNT);
        cnt += delta;
-       LOCAL_HUB_S(slice ? PI_RT_COMPARE_A : PI_RT_COMPARE_B, cnt);
+       LOCAL_HUB_S(PI_RT_COMPARE_A + PI_COUNT_OFFSET * slice, cnt);
 
        return LOCAL_HUB_L(PI_RT_COUNT) >= cnt ? -ETIME : 0;
 }
@@ -164,9 +164,12 @@ static irqreturn_t hub_rt_counter_handler(int irq, void 
*dev_id)
 {
        struct clock_event_device *cd = dev_id;
        unsigned int cpu = smp_processor_id();
-       int slice = cputoslice(cpu) == 0;
+       int slice = cputoslice(cpu);
 
-       LOCAL_HUB_S(slice ? PI_RT_PEND_A : PI_RT_PEND_B, 0);    /* Ack  */
+       /*
+        * Ack
+        */
+       LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, cnt);
        cd->event_handler(cd);
 
        return IRQ_HANDLED;
-
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