[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130318195837.GS9189@mwanda>
Date: Mon, 18 Mar 2013 22:58:37 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Eduardo Valentin <eduardo.valentin@...com>
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH 2/8] staging: omap-thermal: use spin_lock_irqsave inside
IRQ handler
On Mon, Mar 18, 2013 at 03:38:38PM -0400, Eduardo Valentin wrote:
> On 18-03-2013 15:16, Dan Carpenter wrote:
> >On Mon, Mar 18, 2013 at 10:59:10AM -0400, Eduardo Valentin wrote:
> >>Even if the IRQ is not firing because it is ONE_SHOT and disable
> >>at INTC level, the IRQ handler must use spin_lock_irqsave.
> >>It is necessary to disable IRQs from the current
> >>CPU while it is holding a spin_lock which is need.
> >>
> >
> >Gar... I think I was just totally wrong on this. I think your
> >original code was fine. Sorry Eduardo and Greg.
> >
> >This is a threaded IRQ so the regular spin_lock is fine or even the
> >mutex would have been.
>
> In fact it is. But I rather prefer to use spinlocks there, just to
> keep the irq handler sane, even if it is moved to non-threaded IRQ.
Yep. I'd agree there.
>
> >
> >IRQ_ONESHOT is about triggering a second IRQ before the first one
> >has been finished, btw.
>
> It is, and that gets done by masking the IRQ at INTC level.
>
> >
> >I am an idiot.
>
>
> Not really. Thanks for your time reviewing the driver.
>
> I will resend this series. Drop this one and split patch 4/8 into
> two I think (one for moving files, one for renaming functions)
Great. Much appreciated.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists