drivers/pci/ intr remapping: use nr_irqs

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Yinghai Lu 2008-08-19 20:49:51 -07:00 committed by Ingo Molnar
parent 60e4ad7a72
commit a06148c36d

View File

@ -22,7 +22,7 @@ static DEFINE_SPINLOCK(irq_2_ir_lock);
int irq_remapped(int irq)
{
if (irq > NR_IRQS)
if (irq > nr_irqs)
return 0;
if (!irq_2_iommu[irq].iommu)
@ -35,7 +35,7 @@ int get_irte(int irq, struct irte *entry)
{
int index;
if (!entry || irq > NR_IRQS)
if (!entry || irq > nr_irqs)
return -1;
spin_lock(&irq_2_ir_lock);
@ -126,7 +126,7 @@ int map_irq_to_irte_handle(int irq, u16 *sub_handle)
int index;
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || !irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || !irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}
@ -140,7 +140,7 @@ int map_irq_to_irte_handle(int irq, u16 *sub_handle)
int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index, u16 subhandle)
{
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}
@ -158,7 +158,7 @@ int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index, u16 subhandle)
int clear_irte_irq(int irq, struct intel_iommu *iommu, u16 index)
{
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || !irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || !irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}
@ -180,7 +180,7 @@ int modify_irte(int irq, struct irte *irte_modified)
struct intel_iommu *iommu;
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || !irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || !irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}
@ -205,7 +205,7 @@ int flush_irte(int irq)
struct intel_iommu *iommu;
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || !irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || !irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}
@ -248,7 +248,7 @@ int free_irte(int irq)
struct intel_iommu *iommu;
spin_lock(&irq_2_ir_lock);
if (irq >= NR_IRQS || !irq_2_iommu[irq].iommu) {
if (irq >= nr_irqs || !irq_2_iommu[irq].iommu) {
spin_unlock(&irq_2_ir_lock);
return -1;
}