diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:15:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:15:37 -0500 |
commit | fb7b096d949fa852442ed9d8f982bce526ccfe7e (patch) | |
tree | 883e7e43331d9962bcc6050a3bf88615a8c61063 /arch/x86/kernel/irqinit.c | |
parent | a626b46e17d0762d664ce471d40bc506b6e721ab (diff) | |
parent | fad539956c9e69749a03f7817d22d1bab87657bf (diff) |
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
x86: Fix out of order of gsi
x86: apic: Fix mismerge, add arch_probe_nr_irqs() again
x86, irq: Keep chip_data in create_irq_nr and destroy_irq
xen: Remove unnecessary arch specific xen irq functions.
smp: Use nr_cpus= to set nr_cpu_ids early
x86, irq: Remove arch_probe_nr_irqs
sparseirq: Use radix_tree instead of ptrs array
sparseirq: Change irq_desc_ptrs to static
init: Move radix_tree_init() early
irq: Remove unnecessary bootmem code
x86: Add iMac9,1 to pci_reboot_dmi_table
x86: Convert i8259_lock to raw_spinlock
x86: Convert nmi_lock to raw_spinlock
x86: Convert ioapic_lock and vector_lock to raw_spinlock
x86: Avoid race condition in pci_enable_msix()
x86: Fix SCI on IOAPIC != 0
x86, ia32_aout: do not kill argument mapping
x86, irq: Move __setup_vector_irq() before the first irq enable in cpu online path
x86, irq: Update the vector domain for legacy irqs handled by io-apic
x86, irq: Don't block IRQ0_VECTOR..IRQ15_VECTOR's on all cpu's
...
Diffstat (limited to 'arch/x86/kernel/irqinit.c')
-rw-r--r-- | arch/x86/kernel/irqinit.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index d5932226614f..fce55d532631 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
@@ -84,24 +84,7 @@ static struct irqaction irq2 = { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { | 86 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { |
87 | [0 ... IRQ0_VECTOR - 1] = -1, | 87 | [0 ... NR_VECTORS - 1] = -1, |
88 | [IRQ0_VECTOR] = 0, | ||
89 | [IRQ1_VECTOR] = 1, | ||
90 | [IRQ2_VECTOR] = 2, | ||
91 | [IRQ3_VECTOR] = 3, | ||
92 | [IRQ4_VECTOR] = 4, | ||
93 | [IRQ5_VECTOR] = 5, | ||
94 | [IRQ6_VECTOR] = 6, | ||
95 | [IRQ7_VECTOR] = 7, | ||
96 | [IRQ8_VECTOR] = 8, | ||
97 | [IRQ9_VECTOR] = 9, | ||
98 | [IRQ10_VECTOR] = 10, | ||
99 | [IRQ11_VECTOR] = 11, | ||
100 | [IRQ12_VECTOR] = 12, | ||
101 | [IRQ13_VECTOR] = 13, | ||
102 | [IRQ14_VECTOR] = 14, | ||
103 | [IRQ15_VECTOR] = 15, | ||
104 | [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1 | ||
105 | }; | 88 | }; |
106 | 89 | ||
107 | int vector_used_by_percpu_irq(unsigned int vector) | 90 | int vector_used_by_percpu_irq(unsigned int vector) |
@@ -116,6 +99,9 @@ int vector_used_by_percpu_irq(unsigned int vector) | |||
116 | return 0; | 99 | return 0; |
117 | } | 100 | } |
118 | 101 | ||
102 | /* Number of legacy interrupts */ | ||
103 | int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY; | ||
104 | |||
119 | void __init init_ISA_irqs(void) | 105 | void __init init_ISA_irqs(void) |
120 | { | 106 | { |
121 | int i; | 107 | int i; |
@@ -142,6 +128,19 @@ void __init init_ISA_irqs(void) | |||
142 | 128 | ||
143 | void __init init_IRQ(void) | 129 | void __init init_IRQ(void) |
144 | { | 130 | { |
131 | int i; | ||
132 | |||
133 | /* | ||
134 | * On cpu 0, Assign IRQ0_VECTOR..IRQ15_VECTOR's to IRQ 0..15. | ||
135 | * If these IRQ's are handled by legacy interrupt-controllers like PIC, | ||
136 | * then this configuration will likely be static after the boot. If | ||
137 | * these IRQ's are handled by more mordern controllers like IO-APIC, | ||
138 | * then this vector space can be freed and re-used dynamically as the | ||
139 | * irq's migrate etc. | ||
140 | */ | ||
141 | for (i = 0; i < nr_legacy_irqs; i++) | ||
142 | per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i; | ||
143 | |||
145 | x86_init.irqs.intr_init(); | 144 | x86_init.irqs.intr_init(); |
146 | } | 145 | } |
147 | 146 | ||