linux/kernel/irq
Mika Westerberg e509bd7da1 genirq: Allow migration of chained interrupts by installing default action
When a CPU is offlined all interrupts that have an action are migrated to
other still online CPUs. However, if the interrupt has chained handler
installed this is not done. Chained handlers are used by GPIO drivers which
support interrupts, for instance.

When the affinity is not corrected properly we end up in situation where
most interrupts are not arriving to the online CPUs anymore. For example on
Intel Braswell system which has SD-card card detection signal connected to
a GPIO the IO-APIC routing entries look like below after CPU1 is offlined:

  pin30, enabled , level, low , V(52), IRR(0), S(0), logical , D(03), M(1)
  pin31, enabled , level, low , V(42), IRR(0), S(0), logical , D(03), M(1)
  pin32, enabled , level, low , V(62), IRR(0), S(0), logical , D(03), M(1)
  pin5b, enabled , level, low , V(72), IRR(0), S(0), logical , D(03), M(1)

The problem here is that the destination mask still contains both CPUs even
if CPU1 is already offline. This means that the IO-APIC still routes
interrupts to the other CPU as well.

We solve the problem by providing a default action for chained interrupts.
This action allows the migration code to correct affinity (as it finds
desc->action != NULL).

Also make the default action handler to emit a warning if for some reason a
chained handler ends up calling it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Link: http://lkml.kernel.org/r/1444039935-30475-1-git-send-email-mika.westerberg@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-10-09 22:47:27 +02:00
..
autoprobe.c genirq: Handle pending irqs in irq_startup() 2012-02-15 11:56:59 +01:00
chip.c genirq: Allow migration of chained interrupts by installing default action 2015-10-09 22:47:27 +02:00
cpuhotplug.c genirq: Introduce generic irq migration for cpu hotunplug 2015-10-01 14:51:15 +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 the second parameter from handle_irq_event_percpu() 2015-09-22 16:14:55 +02:00
internals.h genirq: Allow migration of chained interrupts by installing default action 2015-10-09 22:47:27 +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: Introduce generic irq migration for cpu hotunplug 2015-10-01 14:51:15 +02:00
Makefile genirq: Introduce generic irq migration for cpu hotunplug 2015-10-01 14:51:15 +02: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: Allow migration of chained interrupts by installing default action 2015-10-09 22:47:27 +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