summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-15 14:16:55 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:53:15 +0200
commit2cc21ef843d4fb7da122239b644a1f6f0aca60a6 (patch)
tree5d08e110164176c4011e42d4700ecd0050ad0ce9 /drivers/pci
parentc6b7674f323622d86316bf7951ad9cae1ce24642 (diff)
genirq: remove sparse irq code
This code is not ready, but we need to rip it out instead of rebasing as we would lose the APIC/IO_APIC unification otherwise. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/htirq.c19
-rw-r--r--drivers/pci/intr_remapping.c75
2 files changed, 1 insertions, 93 deletions
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
index 9e4929a0083..bf7d6ce9bbb 100644
--- a/drivers/pci/htirq.c
+++ b/drivers/pci/htirq.c
@@ -82,18 +82,6 @@ void unmask_ht_irq(unsigned int irq)
write_ht_irq_msg(irq, &msg);
}
-static unsigned int build_irq_for_pci_dev(struct pci_dev *dev)
-{
- unsigned int irq;
-
- irq = dev->bus->number;
- irq <<= 8;
- irq |= dev->devfn;
- irq <<= 12;
-
- return irq;
-}
-
/**
* __ht_create_irq - create an irq and attach it to a device.
* @dev: The hypertransport device to find the irq capability on.
@@ -110,7 +98,6 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
int max_irq;
int pos;
int irq;
- unsigned int irq_want;
pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
if (!pos)
@@ -138,12 +125,8 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
cfg->msg.address_lo = 0xffffffff;
cfg->msg.address_hi = 0xffffffff;
- irq_want= build_irq_for_pci_dev(dev);
-#ifdef CONFIG_HAVE_SPARSE_IRQ
- irq = create_irq_nr(irq_want + idx);
-#else
irq = create_irq();
-#endif
+
if (irq <= 0) {
kfree(cfg);
return -EBUSY;
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 2dcf973890c..0f43b265eee 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -19,78 +19,6 @@ struct irq_2_iommu {
u8 irte_mask;
};
-#ifdef CONFIG_HAVE_SPARSE_IRQ
-static struct irq_2_iommu *irq_2_iommuX;
-/* fill one page ? */
-static int nr_irq_2_iommu = 0x100;
-static int irq_2_iommu_index;
-DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irq_2_iommu, PAGE_SIZE, NULL);
-
-extern void *__alloc_bootmem_nopanic(unsigned long size,
- unsigned long align,
- unsigned long goal);
-
-static struct irq_2_iommu *get_one_free_irq_2_iommu(int not_used)
-{
- struct irq_2_iommu *iommu;
- unsigned long total_bytes;
-
- if (irq_2_iommu_index >= nr_irq_2_iommu) {
- /*
- * we run out of pre-allocate ones, allocate more
- */
- printk(KERN_DEBUG "try to get more irq_2_iommu %d\n", nr_irq_2_iommu);
-
- total_bytes = sizeof(struct irq_2_iommu)*nr_irq_2_iommu;
-
- if (after_bootmem)
- iommu = kzalloc(total_bytes, GFP_ATOMIC);
- else
- iommu = __alloc_bootmem_nopanic(total_bytes, PAGE_SIZE, 0);
-
- if (!iommu)
- panic("can not get more irq_2_iommu\n");
-
- irq_2_iommuX = iommu;
- irq_2_iommu_index = 0;
- }
-
- iommu = &irq_2_iommuX[irq_2_iommu_index];
- irq_2_iommu_index++;
- return iommu;
-}
-
-static struct irq_2_iommu *irq_2_iommu(unsigned int irq)
-{
- struct irq_desc *desc;
-
- desc = irq_to_desc(irq);
-
- BUG_ON(!desc);
-
- return desc->irq_2_iommu;
-}
-
-static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
-{
- struct irq_desc *desc;
- struct irq_2_iommu *irq_iommu;
-
- /*
- * alloc irq desc if not allocated already.
- */
- desc = irq_to_desc_alloc(irq);
-
- irq_iommu = desc->irq_2_iommu;
-
- if (!irq_iommu)
- desc->irq_2_iommu = get_one_free_irq_2_iommu(irq);
-
- return desc->irq_2_iommu;
-}
-
-#else /* !CONFIG_HAVE_SPARSE_IRQ */
-
#ifdef CONFIG_HAVE_DYN_ARRAY
static struct irq_2_iommu *irq_2_iommuX;
DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL);
@@ -109,7 +37,6 @@ static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
{
return irq_2_iommu(irq);
}
-#endif
static DEFINE_SPINLOCK(irq_2_ir_lock);
@@ -166,11 +93,9 @@ int alloc_irte(struct intel_iommu *iommu, int irq, u16 count)
if (!count)
return -1;
-#ifndef CONFIG_HAVE_SPARSE_IRQ
/* protect irq_2_iommu_alloc later */
if (irq >= nr_irqs)
return -1;
-#endif
/*
* start the IRTE search from index 0.