Re: [PATCH] rtc: Make rtc_update_irq callable with irqs enabled

From: Atsushi Nemoto
Date: Thu Apr 23 2009 - 11:29:20 EST


On Thu, 23 Apr 2009 17:02:53 +0200, Alessandro Zummo <alessandro.zummo@xxxxxxxxxxxx> wrote:
> As I said in my last email to Andrew, I think we can call
> rtc_update_irq with irqs enabled and we don't probably need
> any IRQF_ to request_irq .
>
> Are you willing to make some tests in that direction with your
> drivers?

Yes, if we had consensus of the API change. But since all my drivers
have IRQF_DISABLED and I don't want to drop them, I'm not a good
tester for this ;)

On Thu, 23 Apr 2009 11:07:38 -0400, Mike Frysinger <vapier.adi@xxxxxxxxx> wrote:
> we just removed the shared bit from the Blackfin rtc driver because it
> didnt really make sense for us. i need to test something else, so is
> the only change you need is the one posted originally ? that makes
> more sense to me than forcing everyone to use IRQF_DISABLED.

My original patch should not be merged as is, as David said in other
mail:

On Thu, 9 Apr 2009 16:27:15 -0700, David Brownell <david-b@xxxxxxxxxxx> wrote:
> Any driver doing that right now is by definition buggy; that
> function is clearly defined to need IRQs blocked:
>
> /**
> * rtc_update_irq - report RTC periodic, alarm, and/or update irqs
> * @rtc: the rtc device
> * @num: how many irqs are being reported (usually one)
> * @events: mask of RTC_IRQF with one or more of RTC_PF, RTC_AF, RTC_UF
> * Context: in_interrupt(), irqs blocked
> */
>
> If you're going to change the interface, do it right...
> update that kerneldoc and drivers like rtc-ds130[57],
> rtc-ds1374, and rtc-test which do extra work to follow
> the current interface spec.

I agree on this.

---
Atsushi Nemoto
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/