Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757943Ab3FMQer (ORCPT ); Thu, 13 Jun 2013 12:34:47 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:58473 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755192Ab3FMQep (ORCPT ); Thu, 13 Jun 2013 12:34:45 -0400 MIME-Version: 1.0 In-Reply-To: <24084769.VqIFUPHnqh@flatron> References: <1371058399-31933-1-git-send-email-dianders@chromium.org> <1371058399-31933-3-git-send-email-dianders@chromium.org> <24084769.VqIFUPHnqh@flatron> Date: Thu, 13 Jun 2013 09:34:43 -0700 X-Google-Sender-Auth: zcoEFytjiJZfi1FvAT1bn6vhd04 Message-ID: Subject: Re: [PATCH 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking From: Doug Anderson To: Tomasz Figa Cc: Linus Walleij , Kukjin Kim , Olof Johansson , Simon Glass , Luigi Semenzato , Ilho Lee , =?UTF-8?B?6rmA7J2A6riw?= , "linux-kernel@vger.kernel.org" , linux-samsung-soc Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1301 Lines: 37 Tomasz, On Thu, Jun 13, 2013 at 3:54 AM, Tomasz Figa wrote: > Hi Doug, > > On Wednesday 12 of June 2013 10:33:19 Doug Anderson wrote: >> A level-triggered interrupt should be acked after the interrupt line >> becomes inactive and before it is unmasked, or else another interrupt >> will be immediately triggered. Acking before or after calling the >> handler is not enough. > > Nice catch. > > I guess that pinctrl-s3c64xx will need similar fix as well, won't it? It needs this whole series of 3, probably. The mask and unmask need the lock and as well as the acking for level interrupts. I don't have any way to test that code but it's a pretty simple change to make. Do you want to do it or do you have an idea of someone who should? > I think you can eliminate most of the code by doing this following way: > > if (irqd_get_trigger_type(irqd) & IRQ_TYPE_LEVEL_MASK) > exynos_gpio_irq_ack(irqd); Duh, right. OK, v2 coming shortly. Thank you for pointing out the right way to do this! :) -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/