lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mips: irq: Use DECLARE_BITMAP
On Wed, May 20, 2015 at 05:44:54AM -0700, Joe Perches wrote:

> 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

This only matters to user of the allocate_irqno() API and there is only
on such platform, the IP27 which fortunately uses a NR_IRQS value that
is a multiple of 64, so no impact.

Thanks anyway!

Ralf


\
 
 \ /
  Last update: 2015-05-21 15:21    [W:0.038 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site