From patchwork Wed Feb 18 02:16:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: dayu@datangmobile.cn X-Patchwork-Id: 23321 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 93140DDEDD for ; Wed, 18 Feb 2009 13:18:19 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from mail.datangmobile.cn (mail.datangmobile.cn [219.142.67.62]) by ozlabs.org (Postfix) with ESMTP id 8BF1BDDE9E for ; Wed, 18 Feb 2009 13:16:08 +1100 (EST) content-class: urn:content-classes:message MIME-Version: 1.0 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.25-2.6.28) Date: Wed, 18 Feb 2009 10:16:07 +0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.25-2.6.28) Thread-Index: AcmREJ+5ixviDtrORO+bdu7Z0t30NAAXfyXA From: To: , Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org From: Da Yu Date: Wed, 18 Feb 2009 19:58:20 +0800 Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.25-2.6.28) Signed-off-by: Da Yu --- -----邮件原件----- 发件人: Li Yang [mailto:leoli@freescale.com] 发送时间: 2009年2月17日 22:38 收件人: Kumar Gala 抄送: 笪禹; linux-kernel@vger.kernel.org; linuxppc-dev@ozlabs.org 主题: Re: [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.23) On Tue, Feb 17, 2009 at 10:12 PM, Kumar Gala wrote: > > On Feb 17, 2009, at 6:44 AM, > > wrote: > >> From: Da Yu >> Date: Tue, 17 Feb 2009 19:58:20 +0800 >> Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC >> (2.6.23) >> >> Signed-off-by: Da Yu >> --- > > Please provide a bit more description as to why this fixes the issue. The pending register is write 1 clear. If there are more than one external interrupts pending at the same time, acking the first interrupt will also clear other interrupt pending bits. That will cause loss of interrupt. - Leo --- a/arch/powerpc/sysdev/ipic.c 2009-02-18 09:47:04.000000000 +0800 +++ b/arch/powerpc/sysdev/ipic.c 2009-02-18 09:46:34.000000000 +0800 @@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int vi 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 @@ -592,8 +591,7 @@ static void ipic_mask_irq_and_ack(unsign 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