diff options
Diffstat (limited to 'arch/alpha/kernel/irq.c')
-rw-r--r-- | arch/alpha/kernel/irq.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index ecfa51eafd75..cea8913e74be 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS]; | |||
44 | 44 | ||
45 | int irq_select_affinity(unsigned int irq) | 45 | int irq_select_affinity(unsigned int irq) |
46 | { | 46 | { |
47 | struct irq_desc *desc = irq_to_desc[irq]; | ||
47 | static int last_cpu; | 48 | static int last_cpu; |
48 | int cpu = last_cpu + 1; | 49 | int cpu = last_cpu + 1; |
49 | 50 | ||
50 | if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) | 51 | if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq]) |
51 | return 1; | 52 | return 1; |
52 | 53 | ||
53 | while (!cpu_possible(cpu) || | 54 | while (!cpu_possible(cpu) || |
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq) | |||
55 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); | 56 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); |
56 | last_cpu = cpu; | 57 | last_cpu = cpu; |
57 | 58 | ||
58 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); | 59 | cpumask_copy(desc->affinity, cpumask_of(cpu)); |
59 | irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); | 60 | get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu)); |
60 | return 0; | 61 | return 0; |
61 | } | 62 | } |
62 | #endif /* CONFIG_SMP */ | 63 | #endif /* CONFIG_SMP */ |
@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
67 | int j; | 68 | int j; |
68 | int irq = *(loff_t *) v; | 69 | int irq = *(loff_t *) v; |
69 | struct irqaction * action; | 70 | struct irqaction * action; |
71 | struct irq_desc *desc; | ||
70 | unsigned long flags; | 72 | unsigned long flags; |
71 | 73 | ||
72 | #ifdef CONFIG_SMP | 74 | #ifdef CONFIG_SMP |
@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v) | |||
79 | #endif | 81 | #endif |
80 | 82 | ||
81 | if (irq < ACTUAL_NR_IRQS) { | 83 | if (irq < ACTUAL_NR_IRQS) { |
82 | raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); | 84 | desc = irq_to_desc(irq); |
83 | action = irq_desc[irq].action; | 85 | |
86 | if (!desc) | ||
87 | return 0; | ||
88 | |||
89 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
90 | action = desc->action; | ||
84 | if (!action) | 91 | if (!action) |
85 | goto unlock; | 92 | goto unlock; |
86 | seq_printf(p, "%3d: ", irq); | 93 | seq_printf(p, "%3d: ", irq); |
@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
90 | for_each_online_cpu(j) | 97 | for_each_online_cpu(j) |
91 | seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); | 98 | seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); |
92 | #endif | 99 | #endif |
93 | seq_printf(p, " %14s", irq_desc[irq].chip->name); | 100 | seq_printf(p, " %14s", get_irq_desc_chip(desc)->name); |
94 | seq_printf(p, " %c%s", | 101 | seq_printf(p, " %c%s", |
95 | (action->flags & IRQF_DISABLED)?'+':' ', | 102 | (action->flags & IRQF_DISABLED)?'+':' ', |
96 | action->name); | 103 | action->name); |
@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
103 | 110 | ||
104 | seq_putc(p, '\n'); | 111 | seq_putc(p, '\n'); |
105 | unlock: | 112 | unlock: |
106 | raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 113 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
107 | } else if (irq == ACTUAL_NR_IRQS) { | 114 | } else if (irq == ACTUAL_NR_IRQS) { |
108 | #ifdef CONFIG_SMP | 115 | #ifdef CONFIG_SMP |
109 | seq_puts(p, "IPI: "); | 116 | seq_puts(p, "IPI: "); |
@@ -142,8 +149,10 @@ handle_irq(int irq) | |||
142 | * handled by some other CPU. (or is disabled) | 149 | * handled by some other CPU. (or is disabled) |
143 | */ | 150 | */ |
144 | static unsigned int illegal_count=0; | 151 | static unsigned int illegal_count=0; |
152 | struct irq_desc *desc = irq_to_desc(irq); | ||
145 | 153 | ||
146 | if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { | 154 | if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS && |
155 | illegal_count < MAX_ILLEGAL_IRQS)) { | ||
147 | irq_err_count++; | 156 | irq_err_count++; |
148 | illegal_count++; | 157 | illegal_count++; |
149 | printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", | 158 | printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", |
@@ -159,7 +168,7 @@ handle_irq(int irq) | |||
159 | * at IPL 0. | 168 | * at IPL 0. |
160 | */ | 169 | */ |
161 | local_irq_disable(); | 170 | local_irq_disable(); |
162 | generic_handle_irq(irq); | 171 | generic_handle_irq_desc(irq, desc); |
163 | irq_exit(); | 172 | irq_exit(); |
164 | } | 173 | } |
165 | 174 | ||