diff options
Diffstat (limited to 'kernel/irq/migration.c')
-rw-r--r-- | kernel/irq/migration.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index 441fd629ff04..47420908fba0 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c | |||
@@ -4,23 +4,23 @@ | |||
4 | 4 | ||
5 | #include "internals.h" | 5 | #include "internals.h" |
6 | 6 | ||
7 | void move_masked_irq(int irq) | 7 | void irq_move_masked_irq(struct irq_data *idata) |
8 | { | 8 | { |
9 | struct irq_desc *desc = irq_to_desc(irq); | 9 | struct irq_desc *desc = irq_data_to_desc(idata); |
10 | struct irq_chip *chip = desc->irq_data.chip; | 10 | struct irq_chip *chip = idata->chip; |
11 | 11 | ||
12 | if (likely(!(desc->status & IRQ_MOVE_PENDING))) | 12 | if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) |
13 | return; | 13 | return; |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Paranoia: cpu-local interrupts shouldn't be calling in here anyway. | 16 | * Paranoia: cpu-local interrupts shouldn't be calling in here anyway. |
17 | */ | 17 | */ |
18 | if (CHECK_IRQ_PER_CPU(desc->status)) { | 18 | if (!irqd_can_balance(&desc->irq_data)) { |
19 | WARN_ON(1); | 19 | WARN_ON(1); |
20 | return; | 20 | return; |
21 | } | 21 | } |
22 | 22 | ||
23 | desc->status &= ~IRQ_MOVE_PENDING; | 23 | irqd_clr_move_pending(&desc->irq_data); |
24 | 24 | ||
25 | if (unlikely(cpumask_empty(desc->pending_mask))) | 25 | if (unlikely(cpumask_empty(desc->pending_mask))) |
26 | return; | 26 | return; |
@@ -35,7 +35,7 @@ void move_masked_irq(int irq) | |||
35 | * do the disable, re-program, enable sequence. | 35 | * do the disable, re-program, enable sequence. |
36 | * This is *not* particularly important for level triggered | 36 | * This is *not* particularly important for level triggered |
37 | * but in a edge trigger case, we might be setting rte | 37 | * but in a edge trigger case, we might be setting rte |
38 | * when an active trigger is comming in. This could | 38 | * when an active trigger is coming in. This could |
39 | * cause some ioapics to mal-function. | 39 | * cause some ioapics to mal-function. |
40 | * Being paranoid i guess! | 40 | * Being paranoid i guess! |
41 | * | 41 | * |
@@ -53,15 +53,14 @@ void move_masked_irq(int irq) | |||
53 | cpumask_clear(desc->pending_mask); | 53 | cpumask_clear(desc->pending_mask); |
54 | } | 54 | } |
55 | 55 | ||
56 | void move_native_irq(int irq) | 56 | void irq_move_irq(struct irq_data *idata) |
57 | { | 57 | { |
58 | struct irq_desc *desc = irq_to_desc(irq); | ||
59 | bool masked; | 58 | bool masked; |
60 | 59 | ||
61 | if (likely(!(desc->status & IRQ_MOVE_PENDING))) | 60 | if (likely(!irqd_is_setaffinity_pending(idata))) |
62 | return; | 61 | return; |
63 | 62 | ||
64 | if (unlikely(desc->status & IRQ_DISABLED)) | 63 | if (unlikely(irqd_irq_disabled(idata))) |
65 | return; | 64 | return; |
66 | 65 | ||
67 | /* | 66 | /* |
@@ -69,10 +68,10 @@ void move_native_irq(int irq) | |||
69 | * threaded interrupt with ONESHOT set, we can end up with an | 68 | * threaded interrupt with ONESHOT set, we can end up with an |
70 | * interrupt storm. | 69 | * interrupt storm. |
71 | */ | 70 | */ |
72 | masked = desc->status & IRQ_MASKED; | 71 | masked = irqd_irq_masked(idata); |
73 | if (!masked) | 72 | if (!masked) |
74 | desc->irq_data.chip->irq_mask(&desc->irq_data); | 73 | idata->chip->irq_mask(idata); |
75 | move_masked_irq(irq); | 74 | irq_move_masked_irq(idata); |
76 | if (!masked) | 75 | if (!masked) |
77 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 76 | idata->chip->irq_unmask(idata); |
78 | } | 77 | } |