[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: MIPS: irq: Use DECLARE_BITMAP
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2015-05-31 19:06:11
Message-ID: 20150531190611.BDE05660ED0 () gitolite ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/linus/;a=commit;h=884e7e5e7d1a35b944436895852d5ed24e79d42e
Commit: 884e7e5e7d1a35b944436895852d5ed24e79d42e
Parent: 70f041b6e1ff508750988ffd034ac6117d34d4d7
Refname: refs/heads/master
Author: Joe Perches <joe@perches.com>
AuthorDate: Wed May 20 05:44:54 2015 -0700
Committer: Ralf Baechle <ralf@linux-mips.org>
CommitDate: Tue May 26 16:46:52 2015 +0200
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index d2bfbc2..51f57d8 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -29,7 +29,7 @@
int kgdb_early_setup;
#endif
-static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];
+static DECLARE_BITMAP(irq_map, NR_IRQS);
int allocate_irqno(void)
{
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic