]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3-its: Make free_lpi_range a little cheaper
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 12 Mar 2019 17:33:49 +0000 (18:33 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Apr 2019 14:45:01 +0000 (15:45 +0100)
commitb5d3f8d18e6044a1ae1a9e41c79e9215c6365b3a
tree6310174a0048b773ac6741c99783866a17b8860b
parentc7aa9e162a6fc2307b36c11d3e2625315f068917
irqchip/gic-v3-its: Make free_lpi_range a little cheaper

Using list_add + list_sort to insert an element and keeping the list
sorted is a somewhat blunt instrument; one can find the right place to
insert in fewer lines of code than the cmp callback uses. Moreover,
walking the entire list afterwards to merge adjacent ranges is
overkill, since we know that only the just-inserted element may be
merged with its neighbours.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-gic-v3-its.c