mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Zhou Qiao(周侨)" <qiaozhou@asrmicro.com>
Cc: jason@lakedaemon.net, linux-kernel@vger.kernel.org
Subject: Re: [Questions]: how to extend nr_irqs for arch arm64
Date: Mon, 11 Jan 2016 09:03:51 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1601110856120.3575@nanos> (raw)
In-Reply-To: <F297158F9216834BAB1B3BCC98DBDCCB42D277@mailsh.asrmicro.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1180 bytes --]

On Mon, 11 Jan 2016, Zhou Qiao(周侨) wrote:

> The nr_irqs is set to NR_IRQS by default and NR_IRQS is small(64). Arch/arm
> platforms will re-set nr_irqs to a larger value. I didn't find similar way
> for arm64. The way I can think of is to redefine NR_IRQS. But according
> comments in include/asm-generic/irq.h, NR_IRQS should not be a large
> value. so what's the preferred way to extend nr_irqs, for arm64
> specifically? Thanks in advance.

With SPARSE_IRQ enabled the core will modify nr_irqs with the following
mechanims:

 - Early boot: arch_probe_nr_irqs(). If the return value of that function is >
   	       NR_IRQS then it will be set to that.

	       This is used for interrupts which have to be allocated and
	       assigned in early boot, but that's really only for legacy
	       purposes. So arm64 should not use that at all.

 - Runtime:    The core dynamically increases nr_irqs up to IRQ_BITMAP_BITS,
    	       which is NR_IRQS + 8192.

The runtime increase is happening, when interrupts are allocated. And you
won't notice unless you try to extend nr_irqs above NR_IRQS + 8192. So there
is nothing to do for arm64, it should just work.

Thanks,

	tglx


  reply	other threads:[~2016-01-11  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11  3:18 Zhou Qiao(周侨)
2016-01-11  8:03 ` Thomas Gleixner [this message]
2016-01-11  8:45   ` Zhou Qiao(周侨)
2016-01-11  8:50     ` Thomas Gleixner
2016-01-11  9:04       ` Zhou Qiao(周侨)
2016-01-11  9:17         ` Thomas Gleixner
2016-01-11 11:15           ` Zhou Qiao(周侨)

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=alpine.DEB.2.11.1601110856120.3575@nanos \
    --to=tglx@linutronix.de \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiaozhou@asrmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®