All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
Cc: Ben Dooks <ben@fluff.org.uk>,
	ben-linux@fluff.org, linux-omap@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 2/2] i2c: i2c-omap: Call request_irq with IRQF_DISABLED
Date: Wed, 11 Mar 2009 17:55:50 -0600 (MDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0903111741270.26959@utopia.booyaka.com> (raw)
In-Reply-To: <20090310005222.GE19758@fluff.org.uk>

Hello Ari et al.,

On Tue, 10 Mar 2009, Ben Dooks wrote:

> On Fri, Mar 06, 2009 at 03:34:54PM +0200, Ari Kauppi wrote:
> > I have observed some Spurious IRQ's for I2C1 when all kernel hacking options
> > (and thus LOCKDEP) are disabled.
> > 
> > Applying Richard Woodruff's 'I2C bug fixes for L-O and L-Z' seems to help
> > but IRQF_DISABLED is needed for proper behaviour.
> > 
> > Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
> > Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
> > ---
> >  drivers/i2c/busses/i2c-omap.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> > index 0c3ed41..18af43f 100644
> > --- a/drivers/i2c/busses/i2c-omap.c
> > +++ b/drivers/i2c/busses/i2c-omap.c
> > @@ -847,7 +847,7 @@ omap_i2c_probe(struct platform_device *pdev)
> >  	omap_i2c_init(dev);
> >  
> >  	isr = (dev->rev < OMAP_I2C_REV_2) ? omap_i2c_rev1_isr : omap_i2c_isr;
> > -	r = request_irq(dev->irq, isr, 0, pdev->name, dev);
> > +	r = request_irq(dev->irq, isr, IRQF_DISABLED, pdev->name, dev);
> 
> Is disabling all IRQs on the system the right thing to do?

Ben's right, there shouldn't be any need for this.  This patch could cause 
some unnecessary interrupt service latency.

Ari, are you seeing "Spurious irq XX: XXXXXXXX, please flush posted write 
for irq" messages?  If so, the correct fix for this is to read from the 
device interrupt status register immediately after writing to it.  This 
forces the ARM to wait until the write to the device is complete.  Ari, 
could you make this change to i2c-omap.c:omap_i2c_isr() instead, and test 
whether this fixes the problem?

+ u32 tmp;

...

  omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat);
+ tmp = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG); /* OCP barrier */



- Paul

  parent reply	other threads:[~2009-03-11 23:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 13:34 [PATCH 0/2] i2c: i2c-omap: Reliablity and register fixes Ari Kauppi
     [not found] ` <cover.1236345858.git.Ext-Ari.Kauppi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-03-06 13:34   ` [PATCH 1/2] i2c: i2c-omap: Fix BUFSTAT_REG reading Ari Kauppi
2009-03-06 13:34 ` [PATCH 2/2] i2c: i2c-omap: Call request_irq with IRQF_DISABLED Ari Kauppi
     [not found]   ` <7d7e7dd1a4c64c732a21bdfcf2bd42556be708c3.1236345858.git.Ext-Ari.Kauppi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-03-06 14:54     ` Woodruff, Richard
2009-03-10  0:52     ` Ben Dooks
2009-03-11 19:16       ` Felipe Balbi
2009-03-11 23:55       ` Paul Walmsley [this message]
     [not found]         ` <alpine.DEB.2.00.0903111741270.26959-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2009-03-11 23:59           ` Felipe Balbi
2009-03-12  0:07             ` Paul Walmsley
     [not found]               ` <alpine.DEB.2.00.0903111804510.26959-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2009-03-12  0:20                 ` Kevin Hilman
2009-03-12  0:23               ` Felipe Balbi
2009-03-12  3:30                 ` Paul Walmsley
2009-03-12  0:11             ` Felipe Contreras
2009-03-12  0:25               ` Felipe Balbi
2009-03-12  1:28             ` David Brownell
2009-03-12  0:04           ` Paul Walmsley
2009-03-12  6:26             ` Kauppi Ari (EXT-Ixonos/Oulu)
2009-03-12  6:46               ` Paul Walmsley
2009-03-12  7:54                 ` Kauppi Ari (EXT-Ixonos/Oulu)
2009-03-12  9:58                   ` Paul Walmsley
     [not found]                     ` <alpine.DEB.2.00.0903120356230.26959-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2009-03-12 11:33                       ` Kauppi Ari (EXT-Ixonos/Oulu)
2009-03-12 15:04                         ` Woodruff, Richard
2009-03-13  0:04                         ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.0903111741270.26959@utopia.booyaka.com \
    --to=paul@pwsan.com \
    --cc=Ext-Ari.Kauppi@nokia.com \
    --cc=ben-linux@fluff.org \
    --cc=ben@fluff.org.uk \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.