From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753323AbdJHCer (ORCPT ); Sat, 7 Oct 2017 22:34:47 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35678 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbdJHCep (ORCPT ); Sat, 7 Oct 2017 22:34:45 -0400 Subject: Re: [RESEND PATCH] gpio: omap: Fix lost edge interrupts To: Linus Walleij , Grygorii Strashko Cc: Tony Lindgren , Santosh Shilimkar , Linux-OMAP , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ladislav Michl References: <20171003161705.23398-1-grygorii.strashko@ti.com> From: "santosh.shilimkar@oracle.com" Organization: Oracle Corporation Message-ID: Date: Sat, 7 Oct 2017 19:34:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/7/17 4:18 AM, Linus Walleij wrote: > On Tue, Oct 3, 2017 at 6:17 PM, Grygorii Strashko > wrote: > >> Now acking of edge irqs happens the following way: >> - omap_gpio_irq_handler >> - "isr" = read irq status >> - omap_clear_gpio_irqbank(bank, isr_saved & ~level_mask); >> ^ clear edge status, so irq can be accepted >> - loop while "isr" >> generic_handle_irq() >> - handle_edge_irq() >> - desc->irq_data.chip->irq_ack(&desc->irq_data); >> - omap_gpio_ack_irq() >> it might be that at this moment edge IRQ was triggered again and it will be >> cleared and IRQ will be lost. >> >> Use handle_simple_irq and clear edge interrupts early without disabling them in >> omap_gpio_irq_handler to avoid loosing interrupts. >> >> [1] https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlinux-2Domap-26m-3D149004465313534-26w-3D2&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=XBn1JQGPwR8CsE7xpP3wPlG6DQU7qw8ym65xieNZ4hY&m=GC9UD4RPcq1Ss-JanXn4japAFhT1w4RZlq9WqDLSw_o&s=smHFYjIN3O5THK4qP413bHMnr8PaWUv4xyUbbTwXHk4&e= This link doesn't need to be part of the changelog. >> Signed-off-by: Grygorii Strashko >> Signed-off-by: Ladislav Michl > > Patch applied for fixes. > > I guess it is the right thing to do? > > Other maintainers need to tell me if I should hold it back. > Am fine with it after Grygorii's reasoning. Regards, Santosh