Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757116Ab3FMQka (ORCPT ); Thu, 13 Jun 2013 12:40:30 -0400 Received: from mail-ea0-f182.google.com ([209.85.215.182]:40592 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454Ab3FMQk2 (ORCPT ); Thu, 13 Jun 2013 12:40:28 -0400 From: Tomasz Figa To: Doug Anderson 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 Subject: Re: [PATCH 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking Date: Thu, 13 Jun 2013 18:40:24 +0200 Message-ID: <21437214.t3ykTcfRY8@flatron> User-Agent: KMail/4.10.4 (Linux/3.9.5-gentoo; KDE/4.10.4; x86_64; ; ) In-Reply-To: References: <1371058399-31933-1-git-send-email-dianders@chromium.org> <24084769.VqIFUPHnqh@flatron> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1640 Lines: 51 On Thursday 13 of June 2013 09:34:43 Doug Anderson wrote: > 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'll take care of s3c64xx, probably as a part of my patches finally adding DT support for it, as without them the pinctrl-s3c64xx driver is just sitting there unused. > > 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. Good! > Thank you for pointing out the > right way to do this! :) You're welcome. Best regards, Tomasz -- 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/