From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC
Date: Tue, 10 Aug 2010 15:40:55 +0200 [thread overview]
Message-ID: <20100810134055.GC4268@pengutronix.de> (raw)
In-Reply-To: <20100810120055.GD11268@pengutronix.de>
On Tue, Aug 10, 2010 at 02:00:55PM +0200, Uwe Kleine-K?nig wrote:
> Hi Wolfram,
>
> > > + retval = request_irq(rtc->irq, lpc32xx_rtc_alarm_interrupt,
> > > + IRQF_DISABLED, "rtcalarm", rtc);
> > > + if (retval < 0) {
> > > + dev_err(&pdev->dev, "Can't request interrupt\n");
> > > + goto err_free_irq;
> > > + }
> >
> > I saw that a number of rtc-drivers register their irq after they
> > register the device. I wonder if this is OK here? Couldn't it happen
> > that after rtc_device_register() there is a preemption and another
> > process could set the alarm? Then there is a race between interrupts
> > already enabled and no handler available, no?
> If you do it the other way around the irq might trigger and the handler
> reports an irq for a device that doesn't exist yet.
Well, I was assuming that you initially have all interrupts disabled...
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100810/67be53b7/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <w.sang@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: rtc-linux@googlegroups.com,
Durgesh Pattamatta <durgesh.pattamatta@nxp.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Kevin Wells <wellsk40@gmail.com>
Subject: Re: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC
Date: Tue, 10 Aug 2010 15:40:55 +0200 [thread overview]
Message-ID: <20100810134055.GC4268@pengutronix.de> (raw)
In-Reply-To: <20100810120055.GD11268@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
On Tue, Aug 10, 2010 at 02:00:55PM +0200, Uwe Kleine-König wrote:
> Hi Wolfram,
>
> > > + retval = request_irq(rtc->irq, lpc32xx_rtc_alarm_interrupt,
> > > + IRQF_DISABLED, "rtcalarm", rtc);
> > > + if (retval < 0) {
> > > + dev_err(&pdev->dev, "Can't request interrupt\n");
> > > + goto err_free_irq;
> > > + }
> >
> > I saw that a number of rtc-drivers register their irq after they
> > register the device. I wonder if this is OK here? Couldn't it happen
> > that after rtc_device_register() there is a preemption and another
> > process could set the alarm? Then there is a race between interrupts
> > already enabled and no handler available, no?
> If you do it the other way around the irq might trigger and the handler
> reports an irq for a device that doesn't exist yet.
Well, I was assuming that you initially have all interrupts disabled...
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-08-10 13:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 16:17 RTC: LPC32xx: Introduce RTC driver for the LPC32xx wellsk40 at gmail.com
2010-08-09 16:17 ` wellsk40
2010-08-09 16:17 ` [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC wellsk40 at gmail.com
2010-08-09 16:17 ` wellsk40
2010-08-10 1:55 ` [rtc-linux] " Wan ZongShun
2010-08-10 1:55 ` Wan ZongShun
2010-08-10 19:08 ` Kevin Wells
2010-08-10 19:08 ` Kevin Wells
2010-08-11 1:40 ` Wan ZongShun
2010-08-11 1:40 ` Wan ZongShun
2010-08-10 10:25 ` Wolfram Sang
2010-08-10 10:25 ` Wolfram Sang
2010-08-10 12:00 ` Uwe Kleine-König
2010-08-10 12:00 ` Uwe Kleine-König
2010-08-10 13:40 ` Wolfram Sang [this message]
2010-08-10 13:40 ` Wolfram Sang
2010-08-10 19:08 ` Kevin Wells
2010-08-10 19:08 ` Kevin Wells
2010-08-10 13:34 ` Alessandro Zummo
2010-08-10 13:34 ` Alessandro Zummo
2010-08-10 19:08 ` Kevin Wells
2010-08-10 19:08 ` Kevin Wells
2010-08-09 16:17 ` [PATCH 2/2] rtc: Add support in Makefile/Kconfig for the LPC32XX RTC wellsk40 at gmail.com
2010-08-09 16:17 ` wellsk40
2010-08-10 1:45 ` [rtc-linux] " Wan ZongShun
2010-08-10 1:45 ` Wan ZongShun
2010-08-10 9:25 ` Wolfram Sang
2010-08-10 9:25 ` Wolfram Sang
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=20100810134055.GC4268@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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.