aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/chip.c22
-rw-r--r--kernel/irq/handle.c1
-rw-r--r--kernel/irq/migration.c2
3 files changed, 16 insertions, 9 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 77e551d92239..c041270bfe50 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -320,11 +320,16 @@ static void default_shutdown(unsigned int irq)
320{ 320{
321 struct irq_desc *desc = irq_to_desc(irq); 321 struct irq_desc *desc = irq_to_desc(irq);
322 322
323 desc->irq_data.chip->mask(irq); 323 desc->irq_data.chip->irq_mask(&desc->irq_data);
324 desc->status |= IRQ_MASKED; 324 desc->status |= IRQ_MASKED;
325} 325}
326 326
327/* Temporary migration helpers */ 327/* Temporary migration helpers */
328static void compat_irq_mask(struct irq_data *data)
329{
330 data->chip->mask(data->irq);
331}
332
328static void compat_bus_lock(struct irq_data *data) 333static void compat_bus_lock(struct irq_data *data)
329{ 334{
330 data->chip->bus_lock(data->irq); 335 data->chip->bus_lock(data->irq);
@@ -362,6 +367,9 @@ void irq_chip_set_defaults(struct irq_chip *chip)
362 chip->irq_bus_lock = compat_bus_lock; 367 chip->irq_bus_lock = compat_bus_lock;
363 if (chip->bus_sync_unlock) 368 if (chip->bus_sync_unlock)
364 chip->irq_bus_sync_unlock = compat_bus_sync_unlock; 369 chip->irq_bus_sync_unlock = compat_bus_sync_unlock;
370
371 if (chip->mask)
372 chip->irq_mask = compat_irq_mask;
365} 373}
366 374
367static inline void mask_ack_irq(struct irq_desc *desc, int irq) 375static inline void mask_ack_irq(struct irq_desc *desc, int irq)
@@ -369,17 +377,17 @@ static inline void mask_ack_irq(struct irq_desc *desc, int irq)
369 if (desc->irq_data.chip->mask_ack) 377 if (desc->irq_data.chip->mask_ack)
370 desc->irq_data.chip->mask_ack(irq); 378 desc->irq_data.chip->mask_ack(irq);
371 else { 379 else {
372 desc->irq_data.chip->mask(irq); 380 desc->irq_data.chip->irq_mask(&desc->irq_data);
373 if (desc->irq_data.chip->ack) 381 if (desc->irq_data.chip->ack)
374 desc->irq_data.chip->ack(irq); 382 desc->irq_data.chip->ack(irq);
375 } 383 }
376 desc->status |= IRQ_MASKED; 384 desc->status |= IRQ_MASKED;
377} 385}
378 386
379static inline void mask_irq(struct irq_desc *desc, int irq) 387static inline void mask_irq(struct irq_desc *desc)
380{ 388{
381 if (desc->irq_data.chip->mask) { 389 if (desc->irq_data.chip->irq_mask) {
382 desc->irq_data.chip->mask(irq); 390 desc->irq_data.chip->irq_mask(&desc->irq_data);
383 desc->status |= IRQ_MASKED; 391 desc->status |= IRQ_MASKED;
384 } 392 }
385} 393}
@@ -553,7 +561,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
553 action = desc->action; 561 action = desc->action;
554 if (unlikely(!action || (desc->status & IRQ_DISABLED))) { 562 if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
555 desc->status |= IRQ_PENDING; 563 desc->status |= IRQ_PENDING;
556 mask_irq(desc, irq); 564 mask_irq(desc);
557 goto out; 565 goto out;
558 } 566 }
559 567
@@ -621,7 +629,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
621 irqreturn_t action_ret; 629 irqreturn_t action_ret;
622 630
623 if (unlikely(!action)) { 631 if (unlikely(!action)) {
624 mask_irq(desc, irq); 632 mask_irq(desc);
625 goto out_unlock; 633 goto out_unlock;
626 } 634 }
627 635
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index adca5b4b40d8..3b160ac236b0 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -360,7 +360,6 @@ struct irq_chip dummy_irq_chip = {
360 .enable = compat_noop, 360 .enable = compat_noop,
361 .disable = compat_noop, 361 .disable = compat_noop,
362 .ack = compat_noop, 362 .ack = compat_noop,
363 .mask = compat_noop,
364 .unmask = compat_noop, 363 .unmask = compat_noop,
365 .end = compat_noop, 364 .end = compat_noop,
366}; 365};
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index f923c37e651a..b165ec26b757 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -61,7 +61,7 @@ void move_native_irq(int irq)
61 if (unlikely(desc->status & IRQ_DISABLED)) 61 if (unlikely(desc->status & IRQ_DISABLED))
62 return; 62 return;
63 63
64 desc->irq_data.chip->mask(irq); 64 desc->irq_data.chip->irq_mask(&desc->irq_data);
65 move_masked_irq(irq); 65 move_masked_irq(irq);
66 desc->irq_data.chip->unmask(irq); 66 desc->irq_data.chip->unmask(irq);
67} 67}