* [KJ] save_flags()/cli() replace with spin_lock_irq{save,restore}
@ 2006-10-09 13:38 Amol Lad
2006-10-09 18:00 ` [KJ] save_flags()/cli() replace with spin_lock_irq{save, Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Amol Lad @ 2006-10-09 13:38 UTC (permalink / raw)
To: kernel-janitors
I have a query.
In ARM, does spin_lock_irqsave() disables both IRQs and FIQs (fast
interrupts) ?
If yes, then it is dangerous to replace save_flags()/cli() with
spin_lock_irqsave() in drivers that are required in ARM based systems
also. In ARM cli() diables IRQs and clf() disables FIQs. With this
change we may unintentionally disable FIQs also when it's only required
to disable IRQs
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [KJ] save_flags()/cli() replace with spin_lock_irq{save,
2006-10-09 13:38 [KJ] save_flags()/cli() replace with spin_lock_irq{save,restore} Amol Lad
@ 2006-10-09 18:00 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2006-10-09 18:00 UTC (permalink / raw)
To: kernel-janitors
On Mon, Oct 09, 2006 at 06:56:06PM +0530, Amol Lad wrote:
> In ARM, does spin_lock_irqsave() disables both IRQs and FIQs (fast
> interrupts) ?
>
> If yes, then it is dangerous to replace save_flags()/cli() with
> spin_lock_irqsave() in drivers that are required in ARM based systems
> also. In ARM cli() diables IRQs and clf() disables FIQs. With this
> change we may unintentionally disable FIQs also when it's only required
> to disable IRQs
cli does:
static inline void __deprecated cli(void)
{
local_irq_disable();
}
spin_lock_irq does:
#define _spin_lock_irq(lock) __LOCK_IRQ(lock)
#define __LOCK_IRQ(lock) \
do { local_irq_disable(); __LOCK(lock); } while (0)
see? exactly the same code.
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-09 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 13:38 [KJ] save_flags()/cli() replace with spin_lock_irq{save,restore} Amol Lad
2006-10-09 18:00 ` [KJ] save_flags()/cli() replace with spin_lock_irq{save, Matthew Wilcox
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.