MIPS: irq: Use DECLARE_BITMAP
authorJoe Perches <joe@perches.com>
Wed, 20 May 2015 12:44:54 +0000 (05:44 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 26 May 2015 14:46:52 +0000 (16:46 +0200)
commit884e7e5e7d1a35b944436895852d5ed24e79d42e
tree69c2f68813eaf7c8815ad5c1dbffc2faacddca2a
parent70f041b6e1ff508750988ffd034ac6117d34d4d7
MIPS: irq: Use DECLARE_BITMAP

Use the generic mechanism to declare a bitmap instead of unsigned long.

This could fix an overwrite defect of whatever follows irq_map.

Not all "#define NR_IRQS <value>" are a multiple of BITS_PER_LONG so
using DECLARE_BITMAP allocates the proper number of longs required
for the possible bits.

For instance:

arch/mips/include/asm/mach-ath79/irq.h:#define NR_IRQS                  51
arch/mips/include/asm/mach-db1x00/irq.h:#define NR_IRQS 152
arch/mips/include/asm/mach-lantiq/falcon/irq.h:#define NR_IRQS 328

Signed-off-by: Joe Perches <joe@perches.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/10091/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/irq.c