irq-metag*: stop set_affinity vectoring to offline cpus
authorJames Hogan <james.hogan@imgtec.com>
Tue, 25 Feb 2014 22:05:35 +0000 (22:05 +0000)
committerJiri Slaby <jslaby@suse.cz>
Wed, 5 Mar 2014 16:13:54 +0000 (17:13 +0100)
commit23c0ac16e67d6583d4ca1fa1e1bbf4e66d019bb2
tree744596183e21e147c89cd6ba13afed6a8b6f705c
parentf2dbe242a73ab88c0996e1fe53d86c460d345090
irq-metag*: stop set_affinity vectoring to offline cpus

commit f229006ec6beabf7b844653d92fa61f025fe3dcf upstream.

Fix irq_set_affinity callbacks in the Meta IRQ chip drivers to AND
cpu_online_mask into the cpumask when picking a CPU to vector the
interrupt to.

As Thomas pointed out, the /proc/irq/$N/smp_affinity interface doesn't
filter out offline CPUs, so without this patch if you offline CPU0 and
set an IRQ affinity to 0x3 it vectors the interrupt onto CPU0 even
though it is offline.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-metag@vger.kernel.org
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/irqchip/irq-metag-ext.c
drivers/irqchip/irq-metag.c