~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/x86/kernel/irqinit.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <asm/setup.h>
26
26
#include <asm/i8259.h>
27
27
#include <asm/traps.h>
 
28
#include <asm/prom.h>
28
29
 
29
30
/*
30
31
 * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts:
71
72
static struct irqaction fpu_irq = {
72
73
        .handler = math_error_irq,
73
74
        .name = "fpu",
 
75
        .flags = IRQF_NO_THREAD,
74
76
};
75
77
#endif
76
78
 
80
82
static struct irqaction irq2 = {
81
83
        .handler = no_action,
82
84
        .name = "cascade",
 
85
        .flags = IRQF_NO_THREAD,
83
86
};
84
87
 
85
88
DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
110
113
        legacy_pic->init(0);
111
114
 
112
115
        for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
113
 
                set_irq_chip_and_handler_name(i, chip, handle_level_irq, name);
 
116
                irq_set_chip_and_handler_name(i, chip, handle_level_irq, name);
114
117
}
115
118
 
116
119
void __init init_IRQ(void)
118
121
        int i;
119
122
 
120
123
        /*
 
124
         * We probably need a better place for this, but it works for
 
125
         * now ...
 
126
         */
 
127
        x86_add_irq_domains();
 
128
 
 
129
        /*
121
130
         * On cpu 0, Assign IRQ0_VECTOR..IRQ15_VECTOR's to IRQ 0..15.
122
131
         * If these IRQ's are handled by legacy interrupt-controllers like PIC,
123
132
         * then this configuration will likely be static after the boot. If
164
173
        alloc_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
165
174
 
166
175
        /* IPIs for invalidation */
167
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+0, invalidate_interrupt0);
168
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+1, invalidate_interrupt1);
169
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+2, invalidate_interrupt2);
170
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+3, invalidate_interrupt3);
171
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+4, invalidate_interrupt4);
172
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+5, invalidate_interrupt5);
173
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+6, invalidate_interrupt6);
174
 
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+7, invalidate_interrupt7);
 
176
#define ALLOC_INVTLB_VEC(NR) \
 
177
        alloc_intr_gate(INVALIDATE_TLB_VECTOR_START+NR, \
 
178
                invalidate_interrupt##NR)
 
179
 
 
180
        switch (NUM_INVALIDATE_TLB_VECTORS) {
 
181
        default:
 
182
                ALLOC_INVTLB_VEC(31);
 
183
        case 31:
 
184
                ALLOC_INVTLB_VEC(30);
 
185
        case 30:
 
186
                ALLOC_INVTLB_VEC(29);
 
187
        case 29:
 
188
                ALLOC_INVTLB_VEC(28);
 
189
        case 28:
 
190
                ALLOC_INVTLB_VEC(27);
 
191
        case 27:
 
192
                ALLOC_INVTLB_VEC(26);
 
193
        case 26:
 
194
                ALLOC_INVTLB_VEC(25);
 
195
        case 25:
 
196
                ALLOC_INVTLB_VEC(24);
 
197
        case 24:
 
198
                ALLOC_INVTLB_VEC(23);
 
199
        case 23:
 
200
                ALLOC_INVTLB_VEC(22);
 
201
        case 22:
 
202
                ALLOC_INVTLB_VEC(21);
 
203
        case 21:
 
204
                ALLOC_INVTLB_VEC(20);
 
205
        case 20:
 
206
                ALLOC_INVTLB_VEC(19);
 
207
        case 19:
 
208
                ALLOC_INVTLB_VEC(18);
 
209
        case 18:
 
210
                ALLOC_INVTLB_VEC(17);
 
211
        case 17:
 
212
                ALLOC_INVTLB_VEC(16);
 
213
        case 16:
 
214
                ALLOC_INVTLB_VEC(15);
 
215
        case 15:
 
216
                ALLOC_INVTLB_VEC(14);
 
217
        case 14:
 
218
                ALLOC_INVTLB_VEC(13);
 
219
        case 13:
 
220
                ALLOC_INVTLB_VEC(12);
 
221
        case 12:
 
222
                ALLOC_INVTLB_VEC(11);
 
223
        case 11:
 
224
                ALLOC_INVTLB_VEC(10);
 
225
        case 10:
 
226
                ALLOC_INVTLB_VEC(9);
 
227
        case 9:
 
228
                ALLOC_INVTLB_VEC(8);
 
229
        case 8:
 
230
                ALLOC_INVTLB_VEC(7);
 
231
        case 7:
 
232
                ALLOC_INVTLB_VEC(6);
 
233
        case 6:
 
234
                ALLOC_INVTLB_VEC(5);
 
235
        case 5:
 
236
                ALLOC_INVTLB_VEC(4);
 
237
        case 4:
 
238
                ALLOC_INVTLB_VEC(3);
 
239
        case 3:
 
240
                ALLOC_INVTLB_VEC(2);
 
241
        case 2:
 
242
                ALLOC_INVTLB_VEC(1);
 
243
        case 1:
 
244
                ALLOC_INVTLB_VEC(0);
 
245
                break;
 
246
        }
175
247
 
176
248
        /* IPI for generic function call */
177
249
        alloc_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
243
315
                        set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
244
316
        }
245
317
 
246
 
        if (!acpi_ioapic)
 
318
        if (!acpi_ioapic && !of_ioapic)
247
319
                setup_irq(2, &irq2);
248
320
 
249
321
#ifdef CONFIG_X86_32