• Dou Liyang's avatar
    genirq/affinity: Add is_managed to struct irq_affinity_desc · c410abbb
    Dou Liyang authored
    Devices which use managed interrupts usually have two classes of
    interrupts:
    
      - Interrupts for multiple device queues
      - Interrupts for general device management
    
    Currently both classes are treated the same way, i.e. as managed
    interrupts. The general interrupts get the default affinity mask assigned
    while the device queue interrupts are spread out over the possible CPUs.
    
    Treating the general interrupts as managed is both a limitation and under
    certain circumstances a bug. Assume the following situation:
    
     default_irq_affinity = 4..7
    
    So if CPUs 4-7 are offlined, then the core code will shut down the device
    management interrupts because the last CPU in their affinity mask went
    offline.
    
    It's also a limitation because it's desired to allow manual placement of
    the general device interrupts for various reasons. If they are marked
    managed then the interrupt affinity setting from both user and kernel space
    is disabled. That limitation was reported by Kashyap and Sumit.
    
    Expand struct irq_affinity_desc with a new bit 'is_managed' which is set
    for truly managed interrupts (queue interrupts) and cleared for the general
    device interrupts.
    
    [ tglx: Simplify code and massage changelog ]
    Reported-by: 's avatarKashyap Desai <kashyap.desai@broadcom.com>
    Reported-by: 's avatarSumit Saxena <sumit.saxena@broadcom.com>
    Signed-off-by: 's avatarDou Liyang <douliyangs@gmail.com>
    Signed-off-by: 's avatarThomas Gleixner <tglx@linutronix.de>
    Cc: linux-pci@vger.kernel.org
    Cc: shivasharan.srikanteshwara@broadcom.com
    Cc: ming.lei@redhat.com
    Cc: hch@lst.de
    Cc: bhelgaas@google.com
    Cc: douliyang1@huawei.com
    Link: https://lkml.kernel.org/r/20181204155122.6327-3-douliyangs@gmail.com
    c410abbb
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
affinity.c Loading commit data...
autoprobe.c Loading commit data...
chip.c Loading commit data...
cpuhotplug.c Loading commit data...
debug.h Loading commit data...
debugfs.c Loading commit data...
devres.c Loading commit data...
dummychip.c Loading commit data...
generic-chip.c Loading commit data...
handle.c Loading commit data...
internals.h Loading commit data...
ipi.c Loading commit data...
irq_sim.c Loading commit data...
irqdesc.c Loading commit data...
irqdomain.c Loading commit data...
manage.c Loading commit data...
matrix.c Loading commit data...
migration.c Loading commit data...
msi.c Loading commit data...
pm.c Loading commit data...
proc.c Loading commit data...
resend.c Loading commit data...
settings.h Loading commit data...
spurious.c Loading commit data...
timings.c Loading commit data...