kernel_optimize_test/kernel/irq
Thomas Gleixner 2a1d3ab898 genirq: Handle force threading of irqs with primary and thread handler
Force threading of interrupts does not really deal with interrupts
which are requested with a primary and a threaded handler. The current
policy is to leave them alone and let the primary handler run in
interrupt context, but we set the ONESHOT flag for those interrupts as
well.

Kohji Okuno debugged a problem with the SDHCI driver where the
interrupt thread waits for a hardware interrupt to trigger, which can't
work well because the hardware interrupt is masked due to the ONESHOT
flag being set. He proposed to set the ONESHOT flag only if the
interrupt does not provide a thread handler.

Though that does not work either because these interrupts can be
shared. So the other interrupt would rightfully get the ONESHOT flag
set and therefor the same situation would happen again.

To deal with this proper, we need to force thread the primary handler
of such interrupts as well. That means that the primary interrupt
handler is treated as any other primary interrupt handler which is not
marked IRQF_NO_THREAD. The threaded handler becomes a separate thread
so the SDHCI flow logic can be handled gracefully.

The same issue was reported against 4.1-rt.

Reported-and-tested-by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
Reported-By: Michal Smucr <msmucr@gmail.com>
Reported-and-tested-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1509211058080.5606@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-22 12:39:57 +02:00
..
autoprobe.c
chip.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
debug.h irq: hide debug macros so they don't collide with others. 2012-04-23 12:30:03 -04:00
devres.c genirq: devres: Fix testing return value of request_any_context_irq() 2015-05-13 10:47:37 +02:00
dummychip.c Merge branch 'linus' into irq/core 2015-06-05 22:25:01 +02:00
generic-chip.c genirq: Add chip_[suspend|resume] PM support to irq_chip 2015-07-27 08:09:38 +02:00
handle.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
internals.h genirq: Move field 'node' from irq_data into irq_common_data 2015-09-16 15:46:49 +02:00
irqdesc.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
irqdomain.c genirq: Move field 'node' from irq_data into irq_common_data 2015-09-16 15:46:49 +02:00
Kconfig genirq: Add generic msi irq domain support 2014-11-23 13:01:47 +01:00
Makefile genirq: Add generic msi irq domain support 2014-11-23 13:01:47 +01:00
manage.c genirq: Handle force threading of irqs with primary and thread handler 2015-09-22 12:39:57 +02:00
migration.c genirq: Remove bogus restriction in irq_move_mask_irq() 2015-06-20 19:05:14 +02:00
msi.c genirq/MSI: Move alloc_msi_entry() from PCI into generic MSI code 2015-07-22 18:37:44 +02:00
pm.c genirq: Remove irq argument from suspend/resume_irq() 2015-07-11 23:14:24 +02:00
proc.c genirq: Move field 'affinity' from irq_data into irq_common_data 2015-09-16 15:46:49 +02:00
resend.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
settings.h genirq: Prevent spurious detection for unconditionally polled interrupts 2013-11-13 16:03:02 +01:00
spurious.c genirq: Remove the irq argument from note_interrupt() 2015-07-11 23:14:25 +02:00