• Benjamin Berg's avatar
    um: irqs: process outstanding IRQs when unblocking signals · c140a5bd
    Benjamin Berg authored
    
    
    When in time-travel mode, the eventfd events are read even when signals
    are blocked as SIGIO still needs to be processed. In this case, the
    event is cleared on the eventfd but the IRQ still needs to be fired
    later.
    
    We did already ensure that the SIGIO handler is run again. However, the
    FDs are configured to be level triggered, so that eventfd will not
    notify again. As such, add some logic to mark the IRQ as pending and
    process it at the next opportunity.
    
    To avoid duplication, reuse the logic used for the suspend/resume case.
    This does not really change anything except for delaying running the
    IRQs with timetravel_handler at a slightly later point in time (and
    possibly running non-timetravel IRQs that shouldn't happen earlier).
    While at it, move marking as pending into irq_event_handler as that is
    the more logical place for it to happen.
    Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
    Link: https://patch.msgid.link/20231018123643.1255813-1-benjamin@sipsolutions.net
    
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    c140a5bd
irq.c 18.1 KB