Re: [PATCH] let setup_irq reenable a shared irq

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Thomas Gleixner <tglx@...>
Cc: <linux-kernel@...>, Ingo Molnar <mingo@...>
Date: Monday, April 28, 2008 - 10:11 am

Hello,

Thomas Gleixner wrote:
mmpf.

It's not nice to use disable_irq()/enable_irq() in a driver, is it?
 
It's a ns9215 SoC.  The rtc component has a clock flag that I need to
set before accessing the address space.  After enabling the clock flag
I get an irq if the rtc is up.  The rtc itself uses the same irq.  As I
want to handle the clk enabling in platform code and the actual rtc in a
driver I need a shared irq.
Now the problem is that the rtc remembers its alarm flags over
reboots[1] and starts asserting the irq when the platform code has
requested the irq.

I currently see two ways to handle that:
 1) find an alternative patch similar to the one I sent that don't break
    driver code; or
 2) let the platform code disable the rtc's irqs.

for 1) you need to remember the reason for disabling the irq (or fix all
drivers not to use disable_irq()).  And 2) is ugly because I have to
ioremap then.

Best regards
Uwe

[1] not entirely sure, but I had the rtc in a state in which the rtc
component asserted an irq directly after a reset.

-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] let setup_irq reenable a shared irq, Uwe Kleine-König, (Mon Apr 28, 7:12 am)
Re: [PATCH] let setup_irq reenable a shared irq, Thomas Gleixner, (Mon Apr 28, 9:03 am)
Re: [PATCH] let setup_irq reenable a shared irq, Uwe , (Mon Apr 28, 10:11 am)
Re: [PATCH] let setup_irq reenable a shared irq, Thomas Gleixner, (Mon Apr 28, 12:10 pm)
Re: [PATCH] let setup_irq reenable a shared irq, Eric W. Biederman, (Wed Apr 30, 5:19 pm)
Re: [PATCH] let setup_irq reenable a shared irq, Thomas Gleixner, (Wed Apr 30, 5:36 pm)
Re: [PATCH] let setup_irq reenable a shared irq, Thomas Gleixner, (Tue Apr 29, 12:23 pm)