All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Joe Perches <joe@perches.com>
Cc: linux-mips <linux-mips@linux-mips.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Gabor Juhos <juhosg@openwrt.org>,
	Manuel Lauss <manuel.lauss@googlemail.com>,
	John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH] mips: irq: Use DECLARE_BITMAP
Date: Thu, 21 May 2015 15:14:29 +0200	[thread overview]
Message-ID: <20150521131429.GA8177@linux-mips.org> (raw)
In-Reply-To: <1432125894.2870.284.camel@perches.com>

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

  reply	other threads:[~2015-05-21 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 12:44 [PATCH] mips: irq: Use DECLARE_BITMAP Joe Perches
2015-05-21 13:14 ` Ralf Baechle [this message]
2015-05-21 16:10   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150521131429.GA8177@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=blogic@openwrt.org \
    --cc=joe@perches.com \
    --cc=juhosg@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=manuel.lauss@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.