public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Wolfram Sang <w.sang@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 14:00:55 +0200	[thread overview]
Message-ID: <20100810120055.GD11268@pengutronix.de> (raw)
In-Reply-To: <20100810102507.GB4268@pengutronix.de>

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.
 
Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2010-08-10 12:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09 16:17 RTC: LPC32xx: Introduce RTC driver for the LPC32xx wellsk40
2010-08-09 16:17 ` [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC wellsk40
2010-08-10  1:55   ` [rtc-linux] " Wan ZongShun
2010-08-10 19:08     ` Kevin Wells
2010-08-11  1:40       ` Wan ZongShun
2010-08-10 10:25   ` Wolfram Sang
2010-08-10 12:00     ` Uwe Kleine-König [this message]
2010-08-10 13:40       ` Wolfram Sang
2010-08-10 19:08     ` Kevin Wells
2010-08-10 13:34   ` Alessandro Zummo
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
2010-08-10  1:45   ` [rtc-linux] " Wan ZongShun
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=20100810120055.GD11268@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=durgesh.pattamatta@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=w.sang@pengutronix.de \
    --cc=wellsk40@gmail.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