Re: [PATCH] synchronize_irq needs a barrier

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Maxim Levitsky <maximlevitsky@...>
Cc: <benh@...>, akpm <akpm@...>, Linux Kernel list <linux-kernel@...>, linuxppc-dev list <linuxppc-dev@...>
Date: Friday, October 19, 2007 - 10:25 pm

On Sat, 20 Oct 2007, Maxim Levitsky wrote:

Something like that can work, yes. However, you need to make sure that:

 - even when you ignore the interrupt (because the driver doesn't care, 
   it's suspending), you need to make sure the hardware gets shut up by 
   reading (or writing) the proper interrupt status register.

   Otherwise, with a level interrupt, the interrupt will continue to be 
   held active ("screaming") and the CPU will get interrupted over and 
   over again, until the irq subsystem will just turn the irq off 
   entirely.

 - when you resume, make sure that you get the engine going again, with 
   the understanding that some interrupts may have gotten ignored.

Also, in general, these kinds of things shouldn't always even be 
neicessary. If you use the suspend_late()/resume_early() hooks, those will 
be called with interrupts off, and while they can be harder to debug (and 
may be worth avoiding for non-critical drivers), they do allow for simpler 
models partly exactly because they don't need to worry about interrupts 
etc.

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Wed Oct 17, 9:25 pm)
Re: [PATCH] synchronize_irq needs a barrier, Maxim Levitsky, (Fri Oct 19, 10:02 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 11:56 pm)
Re: [PATCH] synchronize_irq needs a barrier, Maxim Levitsky, (Sat Oct 20, 12:24 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 1:04 am)
Re: [PATCH] synchronize_irq needs a barrier, Maxim Levitsky, (Sat Oct 20, 1:36 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 1:46 am)
Re: [PATCH] synchronize_irq needs a barrier, Maxim Levitsky, (Sat Oct 20, 2:06 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 2:13 am)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Fri Oct 19, 11:37 pm)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Fri Oct 19, 10:25 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 12:04 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 12:09 am)
Re: [PATCH] synchronize_irq needs a barrier, Maxim Levitsky, (Fri Oct 19, 11:10 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sat Oct 20, 12:06 am)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Wed Oct 17, 10:12 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Wed Oct 17, 10:40 pm)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Thu Oct 18, 10:35 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Thu Oct 18, 5:35 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Wed Oct 17, 10:57 pm)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Thu Oct 18, 10:56 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Thu Oct 18, 6:05 pm)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Thu Oct 18, 6:52 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Thu Oct 18, 7:17 pm)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Thu Oct 18, 7:39 pm)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Thu Oct 18, 10:32 pm)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Thu Oct 18, 10:55 pm)
Re: [PATCH] synchronize_irq needs a barrier, Linus Torvalds, (Thu Oct 18, 11:26 pm)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Fri Oct 19, 12:20 am)
[NET]: Fix possible dev_deactivate race condition, Herbert Xu, (Fri Oct 19, 1:36 am)
Re: [NET]: Fix possible dev_deactivate race condition, Peter Zijlstra, (Fri Oct 19, 3:35 am)
Re: [NET]: Fix possible dev_deactivate race condition, David Miller, (Fri Oct 19, 1:38 am)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Fri Oct 19, 12:48 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 12:58 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Sun Oct 21, 5:10 pm)
[IRQ]: Fix synchronize_irq races with IRQ handler, Herbert Xu, (Mon Oct 22, 11:26 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 12:35 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 12:29 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 12:11 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Fri Oct 19, 12:26 am)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Fri Oct 19, 1:53 am)
Re: [PATCH] synchronize_irq needs a barrier, Nick Piggin, (Thu Oct 18, 10:52 pm)
Re: [PATCH] synchronize_irq needs a barrier, Herbert Xu, (Thu Oct 18, 11:28 pm)
Re: [PATCH] synchronize_irq needs a barrier, Nick Piggin, (Fri Oct 19, 12:49 am)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Thu Oct 18, 7:52 pm)
Re: [PATCH] synchronize_irq needs a barrier, Andrew Morton, (Wed Oct 17, 9:45 pm)
Re: [PATCH] synchronize_irq needs a barrier, Benjamin Herrenschmidt, (Wed Oct 17, 9:55 pm)