android_kernel_xiaomi_sm7250/kernel/irq
Bryan Holty 501f2499b8 [PATCH] IRQ: prevent enabling of previously disabled interrupt
This fix prevents re-disabling and enabling of a previously disabled
interrupt.  On an SMP system with irq balancing enabled; If an interrupt is
disabled from within its own interrupt context with disable_irq_nosync and is
also earmarked for processor migration, the interrupt is blindly moved to the
other processor and enabled without regard for its current "enabled" state.
If there is an interrupt pending, it will unexpectedly invoke the irq handler
on the new irq owning processor (even though the irq was previously disabled)

The more intuitive fix would be to invoke disable_irq_nosync and
enable_irq, but since we already have the desc->lock from __do_IRQ, we
cannot call them directly.  Instead we can use the same logic to disable
and enable found in disable_irq_nosync and enable_irq, with regards to the
desc->depth.

This now prevents a disabled interrupt from being re-disabled, and more
importantly prevents a disabled interrupt from being incorrectly enabled on
a different processor.

Signed-off-by: Bryan Holty <lgeek@frontiernet.net>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:55 -08:00
..
autoprobe.c [PATCH] Using msleep() instead of HZ 2005-06-28 21:20:29 -07:00
handle.c Don't call a NULL ack function in the generic IRQ code. 2005-09-28 20:29:44 +10:00
internals.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [PATCH] irq: uninline migration functions 2006-03-25 08:22:55 -08:00
manage.c [PATCH] Alpha: convert to generic irq framework (generic part) 2006-01-06 08:33:40 -08:00
migration.c [PATCH] IRQ: prevent enabling of previously disabled interrupt 2006-03-25 08:22:55 -08:00
proc.c [PATCH] kernel/: small cleanups 2006-01-08 20:13:48 -08:00
spurious.c [PATCH] irqpoll 2005-06-28 21:20:35 -07:00