Issue: CPU affinity is changed while irqbalance is running.
+ Problem explanation:
- Old code
+ Call xgene_msi_cascade function (CPU x)
+ raw_spin_lock(&desc->lock); (CPU x)
+ Goto generic_handle_irq (CPU x)
+ The CPU x doesn't have a chance to exit the xgene_msi_cascade function to unlock desc->lock before Linux scheduce and call xgene_msi_set_affinity (irqbalance is caller) in the same CPU x
+ In irq_set_affinity, call raw_spin_lock_irqsave(&desc->lock, flags) which cause deadlock to CPU x because it disables preempt
- New code
+ Use chained_irq_enter and exit as the standard way to cascade interrupt functions.
Issue: CPU affinity is changed while irqbalance is running.
+ Problem explanation:
- Old code
+ Call xgene_msi_cascade function (CPU x)
+ raw_spin_ lock(&desc- >lock); (CPU x)
+ Goto generic_handle_irq (CPU x)
+ The CPU x doesn't have a chance to exit the xgene_msi_cascade function to unlock desc->lock before Linux scheduce and call xgene_msi_ set_affinity (irqbalance is caller) in the same CPU x
+ In irq_set_affinity, call raw_spin_ lock_irqsave( &desc-> lock, flags) which cause deadlock to CPU x because it disables preempt
- New code
+ Use chained_irq_enter and exit as the standard way to cascade interrupt functions.