Skip to content

Commit

Permalink
powerpc/83xx: Fix the interrupt loss problem on ipic
Browse files Browse the repository at this point in the history
The interrupt pending register is write 1 clear.  If there are more than
one external interrupts pending at the same time, acking the first
interrupt by reading pending register then OR the corresponding bit and
write back to pending register will also clear other interrupt pending
bits.  That will cause loss of interrupt.

Signed-off-by: Da Yu <dayu@datangmobile.cn>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
dayu@datangmobile.cn authored and Kumar Gala committed Mar 9, 2009
1 parent 1ab082d commit 30c4046
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/powerpc/sysdev/ipic.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int virq)

spin_lock_irqsave(&ipic_lock, flags);

temp = ipic_read(ipic->regs, ipic_info[src].ack);
temp |= (1 << (31 - ipic_info[src].bit));
temp = 1 << (31 - ipic_info[src].bit);
ipic_write(ipic->regs, ipic_info[src].ack, temp);

/* mb() can't guarantee that ack is finished. But it does finish
Expand All @@ -592,8 +591,7 @@ static void ipic_mask_irq_and_ack(unsigned int virq)
temp &= ~(1 << (31 - ipic_info[src].bit));
ipic_write(ipic->regs, ipic_info[src].mask, temp);

temp = ipic_read(ipic->regs, ipic_info[src].ack);
temp |= (1 << (31 - ipic_info[src].bit));
temp = 1 << (31 - ipic_info[src].bit);
ipic_write(ipic->regs, ipic_info[src].ack, temp);

/* mb() can't guarantee that ack is finished. But it does finish
Expand Down

0 comments on commit 30c4046

Please sign in to comment.