Skip to content
Snippets Groups Projects
  • Thomas Gleixner's avatar
    genirq/affinity: Make affinity setting if activated opt-in · 7cf94405
    Thomas Gleixner authored
    stable inclusion
    from linux-4.19.141
    commit 5c4d9eefd314e763dcb2a499797176c17ad6ab69
    
    --------------------------------
    
    commit f0c7baca upstream.
    
    John reported that on a RK3288 system the perf per CPU interrupts are all
    affine to CPU0 and provided the analysis:
    
     "It looks like what happens is that because the interrupts are not per-CPU
      in the hardware, armpmu_request_irq() calls irq_force_affinity() while
      the interrupt is deactivated and then request_irq() with IRQF_PERCPU |
      IRQF_NOBALANCING.
    
      Now when irq_startup() runs with IRQ_STARTUP_NORMAL, it calls
      irq_setup_affinity() which returns early because IRQF_PERCPU and
      IRQF_NOBALANCING are set, leaving the interrupt on its original CPU."
    
    This was broken by the recent commit which blocked interrupt affinity
    setting in hardware before activation of the interrupt. While this works in
    general, it does not work for this particular case. As contrary to the
    i...
    7cf94405