xen/events: Add support for effective affinity mask
authorThomas Gleixner <tglx@linutronix.de>
Mon, 19 Jun 2017 23:37:45 +0000 (01:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jun 2017 16:21:23 +0000 (18:21 +0200)
Update the effective affinity mask when an interrupt was successfully
targeted to a CPU.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235446.799944725@linutronix.de
drivers/xen/events/events_base.c

index b52852f38cff9d07e3326e8659113d9fdb2bba39..2e567d8433b3d4999dba3e67827d8599d4b6dad4 100644 (file)
@@ -1343,8 +1343,12 @@ static int set_affinity_irq(struct irq_data *data, const struct cpumask *dest,
                            bool force)
 {
        unsigned tcpu = cpumask_first_and(dest, cpu_online_mask);
+       int ret = rebind_irq_to_cpu(data->irq, tcpu);
 
-       return rebind_irq_to_cpu(data->irq, tcpu);
+       if (!ret)
+               irq_data_update_effective_affinity(data, cpumask_of(tcpu));
+
+       return ret;
 }
 
 static void enable_dynirq(struct irq_data *data)