This source file includes following definitions.
- init_ISA_irqs
- init_IRQ
- native_init_IRQ
1
2 #include <linux/linkage.h>
3 #include <linux/errno.h>
4 #include <linux/signal.h>
5 #include <linux/sched.h>
6 #include <linux/ioport.h>
7 #include <linux/interrupt.h>
8 #include <linux/irq.h>
9 #include <linux/timex.h>
10 #include <linux/random.h>
11 #include <linux/kprobes.h>
12 #include <linux/init.h>
13 #include <linux/kernel_stat.h>
14 #include <linux/device.h>
15 #include <linux/bitops.h>
16 #include <linux/acpi.h>
17 #include <linux/io.h>
18 #include <linux/delay.h>
19
20 #include <linux/atomic.h>
21 #include <asm/timer.h>
22 #include <asm/hw_irq.h>
23 #include <asm/pgtable.h>
24 #include <asm/desc.h>
25 #include <asm/apic.h>
26 #include <asm/setup.h>
27 #include <asm/i8259.h>
28 #include <asm/traps.h>
29 #include <asm/prom.h>
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 static struct irqaction irq2 = {
51 .handler = no_action,
52 .name = "cascade",
53 .flags = IRQF_NO_THREAD,
54 };
55
56 DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
57 [0 ... NR_VECTORS - 1] = VECTOR_UNUSED,
58 };
59
60 void __init init_ISA_irqs(void)
61 {
62 struct irq_chip *chip = legacy_pic->chip;
63 int i;
64
65
66
67
68
69
70
71 init_bsp_APIC();
72
73 legacy_pic->init(0);
74
75 for (i = 0; i < nr_legacy_irqs(); i++)
76 irq_set_chip_and_handler(i, chip, handle_level_irq);
77 }
78
79 void __init init_IRQ(void)
80 {
81 int i;
82
83
84
85
86
87
88
89
90
91 for (i = 0; i < nr_legacy_irqs(); i++)
92 per_cpu(vector_irq, 0)[ISA_IRQ_VECTOR(i)] = irq_to_desc(i);
93
94 BUG_ON(irq_init_percpu_irqstack(smp_processor_id()));
95
96 x86_init.irqs.intr_init();
97 }
98
99 void __init native_init_IRQ(void)
100 {
101
102 x86_init.irqs.pre_vector_init();
103
104 idt_setup_apic_and_irq_gates();
105 lapic_assign_system_vectors();
106
107 if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs())
108 setup_irq(2, &irq2);
109 }