* [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first [not found] <1360351703-20571-1-git-send-email-yinghai@kernel.org> @ 2013-02-08 19:28 ` Yinghai Lu 2013-03-08 19:43 ` Konrad Rzeszutek Wilk 0 siblings, 1 reply; 4+ messages in thread From: Yinghai Lu @ 2013-02-08 19:28 UTC (permalink / raw) To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Bjorn Helgaas, Rafael J. Wysocki Cc: linux-pci, xen-devel, Yinghai Lu, linux-kernel, Konrad Rzeszutek Wilk We will pre-reserve irq for all gsi at first for x86, so we have to use realloc with it. 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first 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 0 siblings, 2 replies; 4+ messages in thread From: Konrad Rzeszutek Wilk @ 2013-03-08 19:43 UTC (permalink / raw) To: Yinghai Lu Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Bjorn Helgaas, Rafael J. Wysocki, linux-pci, linux-kernel, xen-devel 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? > > 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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first 2013-03-08 19:43 ` Konrad Rzeszutek Wilk @ 2013-03-08 19:46 ` Yinghai Lu 2013-03-08 20:01 ` Konrad Rzeszutek Wilk 1 sibling, 0 replies; 4+ messages in thread From: Yinghai Lu @ 2013-03-08 19:46 UTC (permalink / raw) To: Konrad Rzeszutek Wilk Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Bjorn Helgaas, Rafael J. Wysocki, linux-pci, linux-kernel, xen-devel On Fri, Mar 8, 2013 at 11:43 AM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> 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? In following patch. I put this one forward, so it will not break git bisecting. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 15/26] xen, irq: call irq_realloc_desc_at() at first 2013-03-08 19:43 ` Konrad Rzeszutek Wilk 2013-03-08 19:46 ` Yinghai Lu @ 2013-03-08 20:01 ` Konrad Rzeszutek Wilk 1 sibling, 0 replies; 4+ messages in thread From: Konrad Rzeszutek Wilk @ 2013-03-08 20:01 UTC (permalink / raw) To: Yinghai Lu Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Bjorn Helgaas, Rafael J. Wysocki, linux-pci, linux-kernel, xen-devel 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 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-08 20:01 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 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).