]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: BCM63xx: Replace irq dispatch code with a generic version
authorJonas Gorski <jogo@openwrt.org>
Sat, 12 Jul 2014 10:49:35 +0000 (12:49 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 30 Jul 2014 13:27:47 +0000 (15:27 +0200)
commit86ee4333ba991654f21b7a9e7a7bff0b319f0800
tree878141286a33f5809675f5274e5fcd479a3e15bd
parenta6dfde817cb45934e87d4493df0df3c12a6604e1
MIPS: BCM63xx: Replace irq dispatch code with a generic version

The generic version uses a variable length of u32 registers instead of u32/u64.
This allows easier support for "wider" registers without having to rewrite
everything.

This "generic" version is as fast as the old version in the best case
(i == next set bit), and twice as fast in the worst case in 64 bits.

Using a macro was chosen over a (forced) inline version because gcc generated
more compact code with the macro.

The change from (signed) int to unsigned int for i and to_call was intentional
as the value can be only between 0 and (width - 1) anyway, and allowed gcc to
optimise the code a bit further.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: John Crispin <blogic@openwrt.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Gregory Fong <gregory.0xf0@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7316/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/bcm63xx/irq.c