[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Remove NR_PIRQS definition -- always use NR_IRQS.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1226673205 0 # Node ID 2188ed106885586376f7eb428b9ea9f16ec6f7c7 # Parent 85198c4d4da516000d002f66fded65f11ef64ab6 Remove NR_PIRQS definition -- always use NR_IRQS. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/include/asm-x86/pirq.h | 11 ----------- xen/arch/x86/irq.c | 12 ++++++------ xen/drivers/passthrough/io.c | 4 ++-- xen/drivers/passthrough/pci.c | 6 +++--- xen/drivers/passthrough/vtd/x86/vtd.c | 6 +++--- xen/include/asm-ia64/hvm/irq.h | 1 - xen/include/asm-x86/domain.h | 3 +-- xen/include/asm-x86/hvm/irq.h | 1 - xen/include/xen/hvm/irq.h | 2 +- 9 files changed, 16 insertions(+), 30 deletions(-) diff -r 85198c4d4da5 -r 2188ed106885 xen/arch/x86/irq.c --- a/xen/arch/x86/irq.c Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/arch/x86/irq.c Fri Nov 14 14:33:25 2008 +0000 @@ -770,15 +770,15 @@ int get_free_pirq(struct domain *d, int if ( type == MAP_PIRQ_TYPE_GSI ) { - for ( i = 16; i < NR_PIRQS; i++ ) + for ( i = 16; i < NR_IRQS; i++ ) if ( !d->arch.pirq_vector[i] ) break; - if ( i == NR_PIRQS ) + if ( i == NR_IRQS ) return -ENOSPC; } else { - for ( i = NR_PIRQS - 1; i >= 16; i-- ) + for ( i = NR_IRQS - 1; i >= 16; i-- ) if ( !d->arch.pirq_vector[i] ) break; if ( i == 16 ) @@ -805,7 +805,7 @@ int map_domain_pirq( if ( !IS_PRIV(current->domain) ) return -EPERM; - if ( pirq < 0 || pirq >= NR_PIRQS || vector < 0 || vector >= NR_VECTORS ) + if ( pirq < 0 || pirq >= NR_IRQS || vector < 0 || vector >= NR_VECTORS ) { dprintk(XENLOG_G_ERR, "dom%d: invalid pirq %d or vector %d\n", d->domain_id, pirq, vector); @@ -862,7 +862,7 @@ int unmap_domain_pirq(struct domain *d, int vector, ret = 0; bool_t forced_unbind; - if ( (pirq < 0) || (pirq >= NR_PIRQS) ) + if ( (pirq < 0) || (pirq >= NR_IRQS) ) return -EINVAL; if ( !IS_PRIV(current->domain) ) @@ -926,7 +926,7 @@ void free_domain_pirqs(struct domain *d) spin_lock(&d->event_lock); - for ( i = 0; i < NR_PIRQS; i++ ) + for ( i = 0; i < NR_IRQS; i++ ) if ( d->arch.pirq_vector[i] > 0 ) unmap_domain_pirq(d, i); diff -r 85198c4d4da5 -r 2188ed106885 xen/drivers/passthrough/io.c --- a/xen/drivers/passthrough/io.c Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/drivers/passthrough/io.c Fri Nov 14 14:33:25 2008 +0000 @@ -62,7 +62,7 @@ int pt_irq_create_bind_vtd( struct dev_intx_gsi_link *digl; int pirq = pt_irq_bind->machine_irq; - if ( pirq < 0 || pirq >= NR_PIRQS ) + if ( pirq < 0 || pirq >= NR_IRQS ) return -EINVAL; spin_lock(&d->event_lock); @@ -261,7 +261,7 @@ void hvm_dpci_msi_eoi(struct domain *d, spin_lock(&d->event_lock); pirq = hvm_irq_dpci->msi_gvec_pirq[vector]; - if ( ( pirq >= 0 ) && (pirq < NR_PIRQS) && + if ( ( pirq >= 0 ) && (pirq < NR_IRQS) && test_bit(pirq, hvm_irq_dpci->mapping) && (test_bit(_HVM_IRQ_DPCI_MSI, &hvm_irq_dpci->mirq[pirq].flags))) { diff -r 85198c4d4da5 -r 2188ed106885 xen/drivers/passthrough/pci.c --- a/xen/drivers/passthrough/pci.c Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/drivers/passthrough/pci.c Fri Nov 14 14:33:25 2008 +0000 @@ -171,9 +171,9 @@ static void pci_clean_dpci_irqs(struct d hvm_irq_dpci = domain_get_irq_dpci(d); if ( hvm_irq_dpci != NULL ) { - for ( i = find_first_bit(hvm_irq_dpci->mapping, NR_PIRQS); - i < NR_PIRQS; - i = find_next_bit(hvm_irq_dpci->mapping, NR_PIRQS, i + 1) ) + for ( i = find_first_bit(hvm_irq_dpci->mapping, NR_IRQS); + i < NR_IRQS; + i = find_next_bit(hvm_irq_dpci->mapping, NR_IRQS, i + 1) ) { pirq_guest_unbind(d, i); kill_timer(&hvm_irq_dpci->hvm_timer[irq_to_vector(i)]); diff -r 85198c4d4da5 -r 2188ed106885 xen/drivers/passthrough/vtd/x86/vtd.c --- a/xen/drivers/passthrough/vtd/x86/vtd.c Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/drivers/passthrough/vtd/x86/vtd.c Fri Nov 14 14:33:25 2008 +0000 @@ -121,9 +121,9 @@ void hvm_dpci_isairq_eoi(struct domain * return; } /* Multiple mirq may be mapped to one isa irq */ - for ( i = find_first_bit(dpci->mapping, NR_PIRQS); - i < NR_PIRQS; - i = find_next_bit(dpci->mapping, NR_PIRQS, i + 1) ) + for ( i = find_first_bit(dpci->mapping, NR_IRQS); + i < NR_IRQS; + i = find_next_bit(dpci->mapping, NR_IRQS, i + 1) ) { list_for_each_entry_safe ( digl, tmp, &dpci->mirq[i].digl_list, list ) diff -r 85198c4d4da5 -r 2188ed106885 xen/include/asm-ia64/hvm/irq.h --- a/xen/include/asm-ia64/hvm/irq.h Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/include/asm-ia64/hvm/irq.h Fri Nov 14 14:33:25 2008 +0000 @@ -26,7 +26,6 @@ #define NR_VECTORS 256 #define VIOAPIC_NUM_PINS 48 -#define NR_PIRQS 256 #include <xen/hvm/irq.h> diff -r 85198c4d4da5 -r 2188ed106885 xen/include/asm-x86/domain.h --- a/xen/include/asm-x86/domain.h Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/include/asm-x86/domain.h Fri Nov 14 14:33:25 2008 +0000 @@ -6,7 +6,6 @@ #include <asm/hvm/vcpu.h> #include <asm/hvm/domain.h> #include <asm/e820.h> -#include <asm/pirq.h> #define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo) #define is_pv_32bit_domain(d) ((d)->arch.is_32bit_pv) @@ -237,7 +236,7 @@ struct arch_domain /* NB. protected by d->event_lock and by irq_desc[vector].lock */ int vector_pirq[NR_VECTORS]; - int pirq_vector[NR_PIRQS]; + int pirq_vector[NR_IRQS]; /* Pseudophysical e820 map (XENMEM_memory_map). */ struct e820entry e820[3]; diff -r 85198c4d4da5 -r 2188ed106885 xen/include/asm-x86/hvm/irq.h --- a/xen/include/asm-x86/hvm/irq.h Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/include/asm-x86/hvm/irq.h Fri Nov 14 14:33:25 2008 +0000 @@ -22,7 +22,6 @@ #ifndef __ASM_X86_HVM_IRQ_H__ #define __ASM_X86_HVM_IRQ_H__ -#include <asm/pirq.h> #include <xen/hvm/irq.h> #include <asm/hvm/hvm.h> #include <asm/hvm/vpic.h> diff -r 85198c4d4da5 -r 2188ed106885 xen/include/asm-x86/pirq.h --- a/xen/include/asm-x86/pirq.h Fri Nov 14 14:27:51 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -#ifndef __XEN_PIRQ_H -#define __XEN_PIRQ_H - -#define PIRQ_BASE 0 -#define NR_PIRQS 256 - -#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS) -#define NR_DYNIRQS 256 - -#endif /* __XEN_PIRQ_H */ - diff -r 85198c4d4da5 -r 2188ed106885 xen/include/xen/hvm/irq.h --- a/xen/include/xen/hvm/irq.h Fri Nov 14 14:27:51 2008 +0000 +++ b/xen/include/xen/hvm/irq.h Fri Nov 14 14:33:25 2008 +0000 @@ -63,7 +63,7 @@ struct hvm_girq_dpci_mapping { /* Protected by domain's event_lock */ struct hvm_irq_dpci { /* Machine IRQ to guest device/intx mapping. */ - DECLARE_BITMAP(mapping, NR_PIRQS); + DECLARE_BITMAP(mapping, NR_IRQS); struct hvm_mirq_dpci_mapping mirq[NR_IRQS]; /* Guest IRQ to guest device/intx mapping. */ struct hvm_girq_dpci_mapping girq[NR_IRQS]; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |