diff options
Diffstat (limited to 'arch/ia64/kernel/irq_ia64.c')
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 68339dd0c9e..ba3ba8bc50b 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -180,11 +180,13 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) | |||
180 | saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); | 180 | saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); |
181 | ia64_srlz_d(); | 181 | ia64_srlz_d(); |
182 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 182 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
183 | if (!IS_RESCHEDULE(vector)) { | 183 | if (unlikely(IS_RESCHEDULE(vector))) |
184 | kstat_this_cpu.irqs[vector]++; | ||
185 | else { | ||
184 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 186 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
185 | ia64_srlz_d(); | 187 | ia64_srlz_d(); |
186 | 188 | ||
187 | __do_IRQ(local_vector_to_irq(vector)); | 189 | generic_handle_irq(local_vector_to_irq(vector)); |
188 | 190 | ||
189 | /* | 191 | /* |
190 | * Disable interrupts and send EOI: | 192 | * Disable interrupts and send EOI: |
@@ -225,7 +227,9 @@ void ia64_process_pending_intr(void) | |||
225 | * Perform normal interrupt style processing | 227 | * Perform normal interrupt style processing |
226 | */ | 228 | */ |
227 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 229 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
228 | if (!IS_RESCHEDULE(vector)) { | 230 | if (unlikely(IS_RESCHEDULE(vector))) |
231 | kstat_this_cpu.irqs[vector]++; | ||
232 | else { | ||
229 | struct pt_regs *old_regs = set_irq_regs(NULL); | 233 | struct pt_regs *old_regs = set_irq_regs(NULL); |
230 | 234 | ||
231 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 235 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
@@ -238,7 +242,7 @@ void ia64_process_pending_intr(void) | |||
238 | * Probably could shared code. | 242 | * Probably could shared code. |
239 | */ | 243 | */ |
240 | vectors_in_migration[local_vector_to_irq(vector)]=0; | 244 | vectors_in_migration[local_vector_to_irq(vector)]=0; |
241 | __do_IRQ(local_vector_to_irq(vector)); | 245 | generic_handle_irq(local_vector_to_irq(vector)); |
242 | set_irq_regs(old_regs); | 246 | set_irq_regs(old_regs); |
243 | 247 | ||
244 | /* | 248 | /* |
@@ -258,11 +262,22 @@ void ia64_process_pending_intr(void) | |||
258 | #ifdef CONFIG_SMP | 262 | #ifdef CONFIG_SMP |
259 | extern irqreturn_t handle_IPI (int irq, void *dev_id); | 263 | extern irqreturn_t handle_IPI (int irq, void *dev_id); |
260 | 264 | ||
265 | static irqreturn_t dummy_handler (int irq, void *dev_id) | ||
266 | { | ||
267 | BUG(); | ||
268 | } | ||
269 | |||
261 | static struct irqaction ipi_irqaction = { | 270 | static struct irqaction ipi_irqaction = { |
262 | .handler = handle_IPI, | 271 | .handler = handle_IPI, |
263 | .flags = IRQF_DISABLED, | 272 | .flags = IRQF_DISABLED, |
264 | .name = "IPI" | 273 | .name = "IPI" |
265 | }; | 274 | }; |
275 | |||
276 | static struct irqaction resched_irqaction = { | ||
277 | .handler = dummy_handler, | ||
278 | .flags = SA_INTERRUPT, | ||
279 | .name = "resched" | ||
280 | }; | ||
266 | #endif | 281 | #endif |
267 | 282 | ||
268 | void | 283 | void |
@@ -287,6 +302,7 @@ init_IRQ (void) | |||
287 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); | 302 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); |
288 | #ifdef CONFIG_SMP | 303 | #ifdef CONFIG_SMP |
289 | register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); | 304 | register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); |
305 | register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction); | ||
290 | #endif | 306 | #endif |
291 | #ifdef CONFIG_PERFMON | 307 | #ifdef CONFIG_PERFMON |
292 | pfm_init_percpu(); | 308 | pfm_init_percpu(); |