From: David Brownell <david-b@pacbell.net>
To: Ben Nizette <bn@niasdigital.com>
Cc: p_gortmaker@yahoo.com, "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc-ds1305: Use disable_irq_nosync() from within irq handlers.
Date: Thu, 16 Apr 2009 09:31:33 -0700 [thread overview]
Message-ID: <200904160931.33419.david-b@pacbell.net> (raw)
In-Reply-To: <1239861306.29831.126.camel@linux-51e8.site>
On Wednesday 15 April 2009, Ben Nizette wrote:
>
> disable_irq() should wait for all running handlers to complete
> before returning. As such, if it's used to disable an interrupt
> from that interrupt's handler it will deadlock. This replaces
> the dangerous instances with the _nosync() variant which doesn't
> have this problem.
>
> Signed-off-by: Ben Nizette <bn@niasdigital.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Also ... it would be nice to convert this driver to the
new request_threaded_irq() infrastructure. The board I
had with this chip has a busted ttyS0 *input* line, so it's
not much use for development any more; or I'd update it
myself, it's a simple change. Someone with that hardware
should think about spending the few minutes needed to make
and test that patch.
> ---
> diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
> index fc372df..5c4f789 100644
> --- a/drivers/rtc/rtc-ds1305.c
> +++ b/drivers/rtc/rtc-ds1305.c
> @@ -514,7 +514,7 @@ static irqreturn_t ds1305_irq(int irq, void *p)
> {
> struct ds1305 *ds1305 = p;
>
> - disable_irq(irq);
> + disable_irq_nosync(irq);
> schedule_work(&ds1305->work);
> return IRQ_HANDLED;
> }
> --
> 1.6.0.2
>
>
>
>
prev parent reply other threads:[~2009-04-16 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 5:55 Ben Nizette
2009-04-16 16:31 ` David Brownell [this message]
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=200904160931.33419.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=bn@niasdigital.com \
--cc=linux-kernel@vger.kernel.org \
--cc=p_gortmaker@yahoo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome