|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/4] x86/physdev: factor out the code to allocate and map a pirq
On Thu, Jun 01, 2017 at 03:40:07PM +0100, Andrew Cooper wrote:
> On 01/06/17 12:49, Roger Pau Monne wrote:
> > Move the code to allocate and map a domain pirq (either GSI or MSI)
> > into the x86 irq code base, so that it can be used outside of the
> > physdev ops.
> >
> > This change shouldn't affect the functionality of the already existing
> > physdev ops.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>
> As you are moving code, please could you make some style fixes (which
> can be done on commit if there are no other problems).
As Jan has already RB this, I suggest the person that commits this
applies the following diff on top (if you both agree it's fine).
---8<---
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 5184b6144e..37b4c7dd5a 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -2645,8 +2645,10 @@ int allocate_and_map_msi_pirq(struct domain *d, int
index, int *pirq_p,
msi->entry_nr = 1;
irq = index;
if ( irq == -1 )
+ {
case MAP_PIRQ_TYPE_MULTI_MSI:
irq = create_irq(NUMA_NO_NODE);
+ }
if ( irq < nr_irqs_gsi || irq >= nr_irqs )
{
@@ -2685,6 +2687,7 @@ int allocate_and_map_msi_pirq(struct domain *d, int
index, int *pirq_p,
spin_unlock(&d->event_lock);
pcidevs_unlock();
if ( ret != 0 )
+ {
switch ( type )
{
case MAP_PIRQ_TYPE_MSI:
@@ -2693,6 +2696,7 @@ int allocate_and_map_msi_pirq(struct domain *d, int
index, int *pirq_p,
destroy_irq(irq);
break;
}
+ }
return ret;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |