[PATCH][PPC32] Fix an Off-By-One Error in arch/ppc/syslib/ipic.c

Randy Vinson rvinson at mvista.com
Sat May 21 10:40:09 EST 2005


Fix an off-by-one error in ipic_init.

There is an off-by-one error in the IPIC code that configures the
external interrupts (Edge or Level Sensitive).

Signed-off-by Randy Vinson <rvinson at mvista.com>

---
commit 0c92b569e09b94a1580cc5bae6efbdd749fec28a
tree 9c1e83adcec1bee0a700888546385444ef5f4000
parent 66e60f92518268f4d2a702a1c4ffbe1caacd6290
author Randy Vinson <rvinson at linuxbox.(none)> Fri, 20 May 2005 15:58:02 -0700
committer Randy Vinson <rvinson at linuxbox.(none)> Fri, 20 May 2005 15:58:02 -0700

arch/ppc/syslib/ipic.c |    2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

Index: arch/ppc/syslib/ipic.c
===================================================================
--- 889a1e2919ac50253be8136a1b0855fde27fcb36/arch/ppc/syslib/ipic.c  (mode:100644)
+++ 9c1e83adcec1bee0a700888546385444ef5f4000/arch/ppc/syslib/ipic.c  (mode:100644)
@@ -479,7 +479,7 @@
    temp = 0;
    for (i = 0 ; i < senses_count ; i++) {
        if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) {
-            temp |= 1 << (16 - i);
+            temp |= 1 << (15 - i);
            if (i != 0)
                irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0;
            else



More information about the Linuxppc-embedded mailing list