From patchwork Tue May 31 08:51:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 97978 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ww0-f56.google.com (mail-ww0-f56.google.com [74.125.82.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id C2BCDB6F6C for ; Tue, 31 May 2011 18:51:58 +1000 (EST) Received: by wwb22 with SMTP id 22sf11716631wwb.11 for ; Tue, 31 May 2011 01:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:x-spam-checker-version :x-spam-level:x-spam-status:x-spam-report:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=/u4a8kTVBvFwDdJ46Bw+xE1z3PaVX2WFYoMXqQs2/NQ=; b=IBUV+3mXY3dUnJZ7f7aU/DzmCSGMQTpdsEhOxsDFfwJ37OjzryiEtK1neHJO4fQNkw FX1cSdtMcAr8DvJOfXhMLreKbobCjt0+b+NgpKowGc9wOkcUHhK8+CdvxLFLF33nSN6F yBxrtl7NEFUoWwVux6nYQiZOPKNTWQYoona4U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:x-spam-checker-version:x-spam-level :x-spam-status:x-spam-report:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; b=jwuxB5O9CPprU+w38TEk+sDSI8QPFyd44QH8ERIc8K/Ydvx3dRLPvKYnCa0so8oRV5 jk9t1euuhCavu4oCf7YA8tO5o84c9aNUd5RdQuzNw9+Qc4eDvrtJ2NMnhAcqBCaMQw4h gfPtYGvKH4/oZjrYP+g++BKbZkr681M7FmnHA= Received: by 10.216.235.210 with SMTP id u60mr1369987weq.2.1306831913772; Tue, 31 May 2011 01:51:53 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.227.5.200 with SMTP id 8ls2582293wbw.1.gmail; Tue, 31 May 2011 01:51:53 -0700 (PDT) Received: by 10.227.130.104 with SMTP id r40mr465252wbs.14.1306831913095; Tue, 31 May 2011 01:51:53 -0700 (PDT) Received: by 10.227.130.104 with SMTP id r40mr465251wbs.14.1306831913070; Tue, 31 May 2011 01:51:53 -0700 (PDT) Received: from smtp.ring0.de (comu.ring0.de [46.4.151.82]) by gmr-mx.google.com with ESMTP id e6si5900063wbh.3.2011.05.31.01.51.52; Tue, 31 May 2011 01:51:52 -0700 (PDT) Received-SPF: neutral (google.com: 46.4.151.82 is neither permitted nor denied by best guess record for domain of sre@debian.org) client-ip=46.4.151.82; Received: by smtp.ring0.de (Postfix, from userid 505) id 67A8C817B6; Tue, 31 May 2011 08:51:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on comu.ring0.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Report: * -2.6 BAYES_00 BODY: Spamwahrscheinlichkeit nach Bayes-Test: 0-1% * [score: 0.0000] * 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS * 0.2 AWL AWL: From: address is in the auto white-list Received: from sre.ring0.de (unknown [134.106.131.183]) by smtp.ring0.de (Postfix) with ESMTP id D9569817B5; Tue, 31 May 2011 08:51:39 +0000 (UTC) Date: Tue, 31 May 2011 10:51:39 +0200 From: Sebastian Reichel To: linux-omap@vger.kernel.org Cc: tony@atomide.com, John Stultz , a.zummo@towertech.it, rtc-linux@googlegroups.com, balajitk@ti.com, Ilkka Koskinen Subject: [rtc-linux] Re: [PATCH] rtc-twl: Switch to using threaded irq Message-ID: <20110531085139.GA7290@earth.universe> References: <1300291634-17884-1-git-send-email-ilkka.koskinen@nokia.com> <4F5287B0C366D047BF44025F9ED7BB43E9D7@008-AM1MPN1-001.mgdnok.nokia.com> <1305242664.2680.28.camel@work-vm> <4DD41BE5.4050600@kolumbus.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4DD41BE5.4050600@kolumbus.fi> User-Agent: Mutt/1.5.21 (2010-09-15) X-Original-Sender: sre@debian.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 46.4.151.82 is neither permitted nor denied by best guess record for domain of sre@debian.org) smtp.mail=sre@debian.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Hi, I think the patch should also remove the local_irq_enable() call in twl_rtc_interrupt, since it's no longer needed with threaded irq. At least on the Pandaboard the RTC is still working with the appended patch. -- Sebastian > >> On Apr 13, 2011 Krishnamoorthy, Balaji T wrote: > >>> On Wed, Mar 16, 2011 at 9:37 PM, Ilkka Koskinen > >> wrote: > >>>> > >>>> The driver is accessing to i2c bus in interrupt handler. > >>>> Therefore, it should use threaded irq. > >> > >>> Acked-by: Balaji T K > >> > >>>> > >>>> Signed-off-by: Ilkka Koskinen > >>>> --- > >>>> drivers/rtc/rtc-twl.c | 2 +- > >>>> 1 files changed, 1 insertions(+), 1 deletions(-) > >>>> > >>>> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c > >>>> index ed1b868..2715b96 100644 > >>>> --- a/drivers/rtc/rtc-twl.c > >>>> +++ b/drivers/rtc/rtc-twl.c > >>>> @@ -475,7 +475,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) > >>>> if (ret < 0) > >>>> goto out1; > >>>> > >>>> - ret = request_irq(irq, twl_rtc_interrupt, > >>>> + ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, > >>>> IRQF_TRIGGER_RISING, > >>>> dev_name(&rtc->dev), rtc); > >>>> if (ret < 0) { > >>>> -- > >>>> 1.7.0.4 --- a/drivers/rtc/rtc-twl.c 2011-05-19 06:06:34.000000000 +0200 +++ b/drivers/rtc/rtc-twl.c 2011-05-26 20:34:03.000000000 +0200 @@ -362,14 +362,6 @@ int res; u8 rd_reg; -#ifdef CONFIG_LOCKDEP - /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which - * we don't want and can't tolerate. Although it might be - * friendlier not to borrow this thread context... - */ - local_irq_enable(); -#endif - res = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); if (res) goto out; @@ -462,7 +454,7 @@ if (ret < 0) goto out1; - ret = request_irq(irq, twl_rtc_interrupt, + ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, IRQF_TRIGGER_RISING, dev_name(&rtc->dev), rtc); if (ret < 0) {