]> 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)
commit16d70dd2633ca13190406f25f46e3117a4ba1851
tree6310174a0048b773ac6741c99783866a17b8860b
parentd444edf5fd7eeaafc8e5f3936872fa5937d7c17e
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