diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-10-15 08:16:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:53:15 -0400 |
commit | 2cc21ef843d4fb7da122239b644a1f6f0aca60a6 (patch) | |
tree | 5d08e110164176c4011e42d4700ecd0050ad0ce9 /drivers/pci/intr_remapping.c | |
parent | c6b7674f323622d86316bf7951ad9cae1ce24642 (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/intr_remapping.c')
-rw-r--r-- | drivers/pci/intr_remapping.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 2dcf973890c4..0f43b265eee6 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -19,78 +19,6 @@ struct irq_2_iommu { | |||
19 | u8 irte_mask; | 19 | u8 irte_mask; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #ifdef CONFIG_HAVE_SPARSE_IRQ | ||
23 | static struct irq_2_iommu *irq_2_iommuX; | ||
24 | /* fill one page ? */ | ||
25 | static int nr_irq_2_iommu = 0x100; | ||
26 | static int irq_2_iommu_index; | ||
27 | DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irq_2_iommu, PAGE_SIZE, NULL); | ||
28 | |||
29 | extern void *__alloc_bootmem_nopanic(unsigned long size, | ||
30 | unsigned long align, | ||
31 | unsigned long goal); | ||
32 | |||
33 | static struct irq_2_iommu *get_one_free_irq_2_iommu(int not_used) | ||
34 | { | ||
35 | struct irq_2_iommu *iommu; | ||
36 | unsigned long total_bytes; | ||
37 | |||
38 | if (irq_2_iommu_index >= nr_irq_2_iommu) { | ||
39 | /* | ||
40 | * we run out of pre-allocate ones, allocate more | ||
41 | */ | ||
42 | printk(KERN_DEBUG "try to get more irq_2_iommu %d\n", nr_irq_2_iommu); | ||
43 | |||
44 | total_bytes = sizeof(struct irq_2_iommu)*nr_irq_2_iommu; | ||
45 | |||
46 | if (after_bootmem) | ||
47 | iommu = kzalloc(total_bytes, GFP_ATOMIC); | ||
48 | else | ||
49 | iommu = __alloc_bootmem_nopanic(total_bytes, PAGE_SIZE, 0); | ||
50 | |||
51 | if (!iommu) | ||
52 | panic("can not get more irq_2_iommu\n"); | ||
53 | |||
54 | irq_2_iommuX = iommu; | ||
55 | irq_2_iommu_index = 0; | ||
56 | } | ||
57 | |||
58 | iommu = &irq_2_iommuX[irq_2_iommu_index]; | ||
59 | irq_2_iommu_index++; | ||
60 | return iommu; | ||
61 | } | ||
62 | |||
63 | static struct irq_2_iommu *irq_2_iommu(unsigned int irq) | ||
64 | { | ||
65 | struct irq_desc *desc; | ||
66 | |||
67 | desc = irq_to_desc(irq); | ||
68 | |||
69 | BUG_ON(!desc); | ||
70 | |||
71 | return desc->irq_2_iommu; | ||
72 | } | ||
73 | |||
74 | static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) | ||
75 | { | ||
76 | struct irq_desc *desc; | ||
77 | struct irq_2_iommu *irq_iommu; | ||
78 | |||
79 | /* | ||
80 | * alloc irq desc if not allocated already. | ||
81 | */ | ||
82 | desc = irq_to_desc_alloc(irq); | ||
83 | |||
84 | irq_iommu = desc->irq_2_iommu; | ||
85 | |||
86 | if (!irq_iommu) | ||
87 | desc->irq_2_iommu = get_one_free_irq_2_iommu(irq); | ||
88 | |||
89 | return desc->irq_2_iommu; | ||
90 | } | ||
91 | |||
92 | #else /* !CONFIG_HAVE_SPARSE_IRQ */ | ||
93 | |||
94 | #ifdef CONFIG_HAVE_DYN_ARRAY | 22 | #ifdef CONFIG_HAVE_DYN_ARRAY |
95 | static struct irq_2_iommu *irq_2_iommuX; | 23 | static struct irq_2_iommu *irq_2_iommuX; |
96 | DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL); | 24 | 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) | |||
109 | { | 37 | { |
110 | return irq_2_iommu(irq); | 38 | return irq_2_iommu(irq); |
111 | } | 39 | } |
112 | #endif | ||
113 | 40 | ||
114 | static DEFINE_SPINLOCK(irq_2_ir_lock); | 41 | static DEFINE_SPINLOCK(irq_2_ir_lock); |
115 | 42 | ||
@@ -166,11 +93,9 @@ int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | |||
166 | if (!count) | 93 | if (!count) |
167 | return -1; | 94 | return -1; |
168 | 95 | ||
169 | #ifndef CONFIG_HAVE_SPARSE_IRQ | ||
170 | /* protect irq_2_iommu_alloc later */ | 96 | /* protect irq_2_iommu_alloc later */ |
171 | if (irq >= nr_irqs) | 97 | if (irq >= nr_irqs) |
172 | return -1; | 98 | return -1; |
173 | #endif | ||
174 | 99 | ||
175 | /* | 100 | /* |
176 | * start the IRTE search from index 0. | 101 | * start the IRTE search from index 0. |