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 10:17:44 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1601111015500.3575@nanos> (raw)
In-Reply-To: <F297158F9216834BAB1B3BCC98DBDCCB42D2E3@mailsh.asrmicro.com>

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

On Mon, 11 Jan 2016, Zhou Qiao(周侨) wrote:
> > From: Thomas Gleixner [mailto:tglx@linutronix.de]
> > On Mon, 11 Jan 2016, Zhou Qiao(周侨) wrote:
> > > I met an issue here. The nr_irqs is extended when the start_irq + cnt
> > > > nr_irqs. So when nr_irqs is not extended(still 64), a device with a
> > > large
> > > hr_irq(70) will get a wrong virq. since it will be mod by nr_irqs
> > > before
> > 
> > No, it won't get a wrong virq. It will get a virq and it does not
> > matter at all whether the hardware irq number is 10, 70, 500 or 5000.
> > What's your problem?
> 
> Let's assume the hw_irq is 70, and after the mod operation, it will call
> irq_alloc_descs_from with parameter from = 6, instead of 70. So the newly
> allocated descriptor is mapped to hw_irq = 6, not 70. Later when driver
> registers irq with irq = 70, it will fail since there is no irq descriptor
> for irq = 70.

Rightfully so. The driver cannot assume irq=70. That's what the device tree
mapping is for. It will tell the driver that it has to request virq 6. There
is no 1:1 mapping between hardware irqs and virqs.

Thanks,

	tglx

  reply	other threads:[~2016-01-11  9:18 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
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 [this message]
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.1601111015500.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®