diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:50:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:51 -0400 |
commit | cb5bc83225a86ca53bbb889ed8439e4fd6cf44ac (patch) | |
tree | d2c43413adbc86562ab63498e3ce14e36ba253ed /arch/x86 | |
parent | 1d5f6b36c4736af1dac396d6267eb53dcc8c0021 (diff) |
x86_64: rename irq_desc/irq_desc_alloc
change names:
irq_desc() ==> irq_desc_alloc
__irq_desc() ==> irq_desc
Also split a few of the uses in lowlevel x86 code.
v2: need to check if desc is null in smp_irq_move_cleanup
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/irq_64.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/irqinit_64.c | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 1b8cccb5ba25..a054db9ef190 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -1124,7 +1124,12 @@ static void ioapic_register_intr(int irq, unsigned long trigger) | |||
1124 | { | 1124 | { |
1125 | struct irq_desc *desc; | 1125 | struct irq_desc *desc; |
1126 | 1126 | ||
1127 | desc = irq_to_desc(irq); | 1127 | /* first time to use this irq_desc */ |
1128 | if (irq < 16) | ||
1129 | desc = irq_to_desc(irq); | ||
1130 | else | ||
1131 | desc = irq_to_desc_alloc(irq); | ||
1132 | |||
1128 | if (trigger) | 1133 | if (trigger) |
1129 | desc->status |= IRQ_LEVEL; | 1134 | desc->status |= IRQ_LEVEL; |
1130 | else | 1135 | else |
@@ -1919,6 +1924,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) | |||
1919 | irq = __get_cpu_var(vector_irq)[vector]; | 1924 | irq = __get_cpu_var(vector_irq)[vector]; |
1920 | 1925 | ||
1921 | desc = irq_to_desc(irq); | 1926 | desc = irq_to_desc(irq); |
1927 | if (!desc) | ||
1928 | continue; | ||
1929 | |||
1922 | cfg = irq_cfg(irq); | 1930 | cfg = irq_cfg(irq); |
1923 | spin_lock(&desc->lock); | 1931 | spin_lock(&desc->lock); |
1924 | if (!cfg->move_cleanup_count) | 1932 | if (!cfg->move_cleanup_count) |
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index f337f87c1e16..5d5976e0311a 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c | |||
@@ -83,7 +83,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
83 | 83 | ||
84 | if (i < nr_irqs) { | 84 | if (i < nr_irqs) { |
85 | unsigned any_count = 0; | 85 | unsigned any_count = 0; |
86 | struct irq_desc *desc = __irq_to_desc(i); | 86 | struct irq_desc *desc = irq_to_desc(i); |
87 | 87 | ||
88 | if (!desc) | 88 | if (!desc) |
89 | return 0; | 89 | return 0; |
@@ -206,7 +206,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs) | |||
206 | stack_overflow_check(regs); | 206 | stack_overflow_check(regs); |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | desc = __irq_to_desc(irq); | 209 | desc = irq_to_desc(irq); |
210 | if (likely(desc)) | 210 | if (likely(desc)) |
211 | generic_handle_irq_desc(irq, desc); | 211 | generic_handle_irq_desc(irq, desc); |
212 | else { | 212 | else { |
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c index cd9f42d028d9..d17fbc26d96f 100644 --- a/arch/x86/kernel/irqinit_64.c +++ b/arch/x86/kernel/irqinit_64.c | |||
@@ -143,7 +143,8 @@ void __init init_ISA_irqs(void) | |||
143 | init_8259A(0); | 143 | init_8259A(0); |
144 | 144 | ||
145 | for (i = 0; i < 16; i++) { | 145 | for (i = 0; i < 16; i++) { |
146 | struct irq_desc *desc = irq_to_desc(i); | 146 | /* first time call this irq_desc */ |
147 | struct irq_desc *desc = irq_to_desc_alloc(i); | ||
147 | 148 | ||
148 | desc->status = IRQ_DISABLED; | 149 | desc->status = IRQ_DISABLED; |
149 | desc->action = NULL; | 150 | desc->action = NULL; |