diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-25 15:12:33 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-29 08:48:00 -0400 |
commit | 428a40c591f5f2ac7531db8dc191534b8590f339 (patch) | |
tree | d6cb7ca837708aae8198f6bb5b0c9d03efb88245 /arch/ia64 | |
parent | 097e98b4fc53fa9e9ef2b7b0c5364f2f079e7d6b (diff) |
ia64: Cleanup migrate_irqs()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/irq.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 94ee9d067cbd..ba29817b51ef 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -130,11 +130,12 @@ unsigned int vectors_in_migration[NR_IRQS]; | |||
130 | */ | 130 | */ |
131 | static void migrate_irqs(void) | 131 | static void migrate_irqs(void) |
132 | { | 132 | { |
133 | struct irq_desc *desc; | ||
134 | int irq, new_cpu; | 133 | int irq, new_cpu; |
135 | 134 | ||
136 | for (irq=0; irq < NR_IRQS; irq++) { | 135 | for (irq=0; irq < NR_IRQS; irq++) { |
137 | desc = irq_desc + irq; | 136 | struct irq_desc *desc = irq_to_desc(irq); |
137 | struct irq_data *data = irq_desc_get_irq_data(desc); | ||
138 | struct irq_chip *chip = irq_data_get_irq_chip(data); | ||
138 | 139 | ||
139 | if (desc->status == IRQ_DISABLED) | 140 | if (desc->status == IRQ_DISABLED) |
140 | continue; | 141 | continue; |
@@ -145,10 +146,10 @@ static void migrate_irqs(void) | |||
145 | * tell CPU not to respond to these local intr sources. | 146 | * tell CPU not to respond to these local intr sources. |
146 | * such as ITV,CPEI,MCA etc. | 147 | * such as ITV,CPEI,MCA etc. |
147 | */ | 148 | */ |
148 | if (desc->status == IRQ_PER_CPU) | 149 | if (irqd_is_per_cpu(data)) |
149 | continue; | 150 | continue; |
150 | 151 | ||
151 | if (cpumask_any_and(irq_desc[irq].affinity, cpu_online_mask) | 152 | if (cpumask_any_and(data->affinity, cpu_online_mask) |
152 | >= nr_cpu_ids) { | 153 | >= nr_cpu_ids) { |
153 | /* | 154 | /* |
154 | * Save it for phase 2 processing | 155 | * Save it for phase 2 processing |
@@ -160,16 +161,16 @@ static void migrate_irqs(void) | |||
160 | /* | 161 | /* |
161 | * Al three are essential, currently WARN_ON.. maybe panic? | 162 | * Al three are essential, currently WARN_ON.. maybe panic? |
162 | */ | 163 | */ |
163 | if (desc->chip && desc->chip->disable && | 164 | if (chip && chip->irq_disable && |
164 | desc->chip->enable && desc->chip->set_affinity) { | 165 | chip->irq_enable && chip->irq_set_affinity) { |
165 | desc->chip->disable(irq); | 166 | chip->irq_disable(data); |
166 | desc->chip->set_affinity(irq, | 167 | chip->irq_set_affinity(data, |
167 | cpumask_of(new_cpu)); | 168 | cpumask_of(new_cpu), false); |
168 | desc->chip->enable(irq); | 169 | chip->irq_enable(data); |
169 | } else { | 170 | } else { |
170 | WARN_ON((!(desc->chip) || !(desc->chip->disable) || | 171 | WARN_ON((!chip || !chip->irq_disable || |
171 | !(desc->chip->enable) || | 172 | !chip->irq_enable || |
172 | !(desc->chip->set_affinity))); | 173 | !chip->irq_set_affinity)); |
173 | } | 174 | } |
174 | } | 175 | } |
175 | } | 176 | } |