diff options
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 2147eab2e6e5..7f4041357d2f 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -395,8 +395,13 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) desc->affinity_notify = notify; raw_spin_unlock_irqrestore(&desc->lock, flags); - if (old_notify) + if (old_notify) { +#ifndef CONFIG_PREEMPT_RT_BASE + /* Need to address this for PREEMPT_RT */ + cancel_work_sync(&old_notify->work); +#endif kref_put(&old_notify->kref, old_notify->release); + } return 0; } @@ -432,6 +437,9 @@ int irq_setup_affinity(struct irq_desc *desc) } cpumask_and(&mask, cpu_online_mask, set); + if (cpumask_empty(&mask)) + cpumask_copy(&mask, cpu_online_mask); + if (node != NUMA_NO_NODE) { const struct cpumask *nodemask = cpumask_of_node(node); |