android_kernel_xiaomi_sm8350/kernel/irq
Russ Anderson c642b8391c __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set
In __do_IRQ(), the normal case is that IRQ_DISABLED is checked and if set
the handler (handle_IRQ_event()) is not called.

Earlier in __do_IRQ(), if IRQ_PER_CPU is set the code does not check
IRQ_DISABLED and calls the handler even though IRQ_DISABLED is set.  This
behavior seems unintentional.

One user encountering this behavior is the CPE handler (in
arch/ia64/kernel/mca.c).  When the CPE handler encounters too many CPEs
(such as a solid single bit error), it sets up a polling timer and disables
the CPE interrupt (to avoid excessive overhead logging the stream of single
bit errors).  disable_irq_nosync() is called which sets IRQ_DISABLED.  The
IRQ_PER_CPU flag was previously set (in ia64_mca_late_init()).  The net
result is the CPE handler gets called even though it is marked disabled.

If the behavior of not checking IRQ_DISABLED when IRQ_PER_CPU is set is
intentional, it would be worthy of a comment describing the intended
behavior.  disable_irq_nosync() does call chip->disable() to provide a
chipset specifiec interface for disabling the interrupt, which avoids this
issue when used.

Signed-off-by: Russ Anderson <rja@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:43 -08:00
..
autoprobe.c
chip.c Compile handle_percpu_irq even for uniprocessor kernels 2007-10-17 08:43:00 -07:00
devres.c rip some includes from linux/interrupt.h 2007-07-28 19:42:22 -07:00
handle.c __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set 2007-11-14 18:45:43 -08:00
internals.h
Makefile
manage.c Fix synchronize_irq races with IRQ handler 2007-10-23 09:01:31 -07:00
migration.c
proc.c x86_64: Report the pending irq if available in smp_affinity 2007-07-21 18:37:07 -07:00
resend.c genirq: suppress resend of level interrupts 2007-08-12 11:05:45 -07:00
spurious.c Improve behaviour of spurious IRQ detect 2007-07-16 09:05:46 -07:00