• Keith Busch's avatar
    PCI/AER: Abstract AER interrupt handling · 390e2db8
    Keith Busch authored
    The aer_inject module was directly calling aer_irq().  This required the
    AER driver export its private IRQ handler for no other reason than to
    support error injection.  A driver should not have to expose its private
    interfaces, so use the IRQ subsystem to route injection to the AER driver,
    and make aer_irq() a private interface.
    
    This provides additional benefits:
    
    First, directly calling the IRQ handler bypassed the IRQ subsytem so the
    injection wasn't really synthesizing what happens if a shared AER interrupt
    occurs.
    
    The error injection had to provide the callback data directly, which may be
    racing with a removal that is freeing that structure.  The IRQ subsystem
    can handle that race.
    
    Finally, using the IRQ subsystem automatically reacts to threaded IRQs,
    keeping the error injection abstracted from that implementation detail.
    Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    390e2db8
portdrv.h 4.64 KB