]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip: mips-gic: Use cpumask_first_and() in gic_set_affinity()
authorPaul Burton <paul.burton@imgtec.com>
Fri, 18 Aug 2017 21:04:35 +0000 (14:04 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 4 Sep 2017 11:53:15 +0000 (13:53 +0200)
commit6e04b7f198df6d24db0ad170b78b2452a2881e7d
treedbbdcb76c0861702d42c56000aa86bb006ff0c6e
parentc3da276bccc002d826ecb447975d4c61b2dcf6b8
irqchip: mips-gic: Use cpumask_first_and() in gic_set_affinity()

Currently in gic_set_affinity() we calculate a temporary cpumask holding
the intersection of the provided cpumask & the CPUs that are online,
then we call cpumask_first twice on it to find the first such CPU. Since
we don't need the temporary cpumask for anything else & we only care
about the first CPU that's both online & in the provided cpumask, we can
instead use cpumask_first_and to find that CPU & drop the temporary
mask.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17110/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/irqchip/irq-mips-gic.c