From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
xen-devel@lists.xensource.com
Subject: Re: [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first
Date: Fri, 8 Mar 2013 15:01:49 -0500 [thread overview]
Message-ID: <20130308200149.GA21611@phenom.dumpdata.com> (raw)
In-Reply-To: <20130308194357.GA6622@phenom.dumpdata.com>
On Fri, Mar 08, 2013 at 02:43:57PM -0500, Konrad Rzeszutek Wilk wrote:
> On Fri, Feb 08, 2013 at 11:28:12AM -0800, Yinghai Lu wrote:
> > We will pre-reserve irq for all gsi at first for x86, so we have to
> > use realloc with it.
>
> Where are the GSI's pre-allocated?
And the answer is in arch_probe_nr_irqs and determined by nr_irqs_gsi.
That data then feeds in early_irq_init which sets the bitmap.
Could you add that please in the git commit if it is not too much
trouble?
>
> >
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > Cc: xen-devel@lists.xensource.com
> > ---
> > drivers/xen/events.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> > index 0be4df3..dda38db 100644
> > --- a/drivers/xen/events.c
> > +++ b/drivers/xen/events.c
> > @@ -482,8 +482,12 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi)
> > /* Legacy IRQ descriptors are already allocated by the arch. */
> > if (gsi < NR_IRQS_LEGACY)
> > irq = gsi;
> > - else
> > - irq = irq_alloc_desc_at(gsi, -1);
> > + else {
> > + /* for x86, irq already get reserved for gsi */
> > + irq = irq_realloc_desc_at(gsi, -1);
> > + if (irq < 0)
> > + irq = irq_alloc_desc_at(gsi, -1);
> > + }
> >
> > xen_irq_init(irq);
> >
> > --
> > 1.7.10.4
> >
prev parent reply other threads:[~2013-03-08 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1360351703-20571-1-git-send-email-yinghai@kernel.org>
2013-02-08 19:28 ` [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first Yinghai Lu
2013-03-08 19:43 ` Konrad Rzeszutek Wilk
2013-03-08 19:46 ` Yinghai Lu
2013-03-08 20:01 ` Konrad Rzeszutek Wilk [this message]
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=20130308200149.GA21611@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xensource.com \
--cc=yinghai@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).