ia64/xen-unstable

changeset 18466:7f1c71c6d4c8

x86: Do not permit 'AUTO_ASSIGN' parameter to PHYSDEVOP_alloc_irq_vector.

It's not needed for MSI handling as Xen hides the vector allocation
and MSI-device programming.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Sep 09 17:28:05 2008 +0100 (2008-09-09)
parents 59904b180078
children 65dc37be0443
files xen/arch/x86/physdev.c
line diff
     1.1 --- a/xen/arch/x86/physdev.c	Tue Sep 09 15:33:27 2008 +0100
     1.2 +++ b/xen/arch/x86/physdev.c	Tue Sep 09 17:28:05 2008 +0100
     1.3 @@ -58,9 +58,6 @@ static int get_free_pirq(struct domain *
     1.4      return i;
     1.5  }
     1.6  
     1.7 -/*
     1.8 - * Caller hold the irq_lock
     1.9 - */
    1.10  static int map_domain_pirq(struct domain *d, int pirq, int vector,
    1.11                             struct physdev_map_pirq *map)
    1.12  {
    1.13 @@ -136,9 +133,7 @@ done:
    1.14      return ret;
    1.15  }
    1.16  
    1.17 -/*
    1.18 - * The pirq should has been unbound before this call
    1.19 - */
    1.20 +/* The pirq should have been unbound before this call. */
    1.21  static int unmap_domain_pirq(struct domain *d, int pirq)
    1.22  {
    1.23      int ret = 0;
    1.24 @@ -452,7 +447,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
    1.25  
    1.26          irq = irq_op.irq;
    1.27          ret = -EINVAL;
    1.28 -        if ( ((irq < 0) && (irq != AUTO_ASSIGN)) || (irq >= NR_IRQS) )
    1.29 +        if ( (irq < 0) || (irq >= NR_IRQS) )
    1.30              break;
    1.31  
    1.32          irq_op.vector = assign_irq_vector(irq);
    1.33 @@ -462,8 +457,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
    1.34          if ( msi_enable )
    1.35          {
    1.36              spin_lock_irqsave(&dom0->arch.irq_lock, flags);
    1.37 -            if ( irq != AUTO_ASSIGN )
    1.38 -                ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
    1.39 +            ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
    1.40              spin_unlock_irqrestore(&dom0->arch.irq_lock, flags);
    1.41          }
    1.42