Blame view
kernel/irq/migration.c
1.67 KB
c777ac559 [PATCH] irq: unin... |
1 |
|
d824e66a9 [PATCH] build ker... |
2 |
#include <linux/irq.h> |
57b150cce irq: only update ... |
3 4 5 |
#include <linux/interrupt.h> #include "internals.h" |
c777ac559 [PATCH] irq: unin... |
6 |
|
a439520f8 genirq: Implement... |
7 |
void irq_move_masked_irq(struct irq_data *idata) |
c777ac559 [PATCH] irq: unin... |
8 |
{ |
a439520f8 genirq: Implement... |
9 10 |
struct irq_desc *desc = irq_data_to_desc(idata); struct irq_chip *chip = idata->chip; |
c777ac559 [PATCH] irq: unin... |
11 |
|
f230b6d5c genirq: Add IRQ_M... |
12 |
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) |
c777ac559 [PATCH] irq: unin... |
13 |
return; |
501f2499b [PATCH] IRQ: prev... |
14 15 16 |
/* * Paranoia: cpu-local interrupts shouldn't be calling in here anyway. */ |
a005677b3 genirq: Mirror IR... |
17 |
if (!irqd_can_balance(&desc->irq_data)) { |
501f2499b [PATCH] IRQ: prev... |
18 19 20 |
WARN_ON(1); return; } |
f230b6d5c genirq: Add IRQ_M... |
21 |
irqd_clr_move_pending(&desc->irq_data); |
c777ac559 [PATCH] irq: unin... |
22 |
|
7f7ace0cd cpumask: update i... |
23 |
if (unlikely(cpumask_empty(desc->pending_mask))) |
c777ac559 [PATCH] irq: unin... |
24 |
return; |
c96b3b3c4 genirq: Provide c... |
25 |
if (!chip->irq_set_affinity) |
c777ac559 [PATCH] irq: unin... |
26 |
return; |
239007b84 genirq: Convert i... |
27 |
assert_raw_spin_locked(&desc->lock); |
501f2499b [PATCH] IRQ: prev... |
28 |
|
c777ac559 [PATCH] irq: unin... |
29 30 31 32 33 |
/* * If there was a valid mask to work with, please * do the disable, re-program, enable sequence. * This is *not* particularly important for level triggered * but in a edge trigger case, we might be setting rte |
25985edce Fix common misspe... |
34 |
* when an active trigger is coming in. This could |
c777ac559 [PATCH] irq: unin... |
35 36 |
* cause some ioapics to mal-function. * Being paranoid i guess! |
e7b946e98 [PATCH] genirq: i... |
37 38 39 |
* * For correct operation this depends on the caller * masking the irqs. |
c777ac559 [PATCH] irq: unin... |
40 |
*/ |
818b0f3bf genirq: Introduce... |
41 42 |
if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids) irq_do_set_affinity(&desc->irq_data, desc->pending_mask, false); |
57b150cce irq: only update ... |
43 |
|
7f7ace0cd cpumask: update i... |
44 |
cpumask_clear(desc->pending_mask); |
c777ac559 [PATCH] irq: unin... |
45 |
} |
e7b946e98 [PATCH] genirq: i... |
46 |
|
a439520f8 genirq: Implement... |
47 |
void irq_move_irq(struct irq_data *idata) |
e7b946e98 [PATCH] genirq: i... |
48 |
{ |
f1a06390d genirq: Prevent i... |
49 |
bool masked; |
e7b946e98 [PATCH] genirq: i... |
50 |
|
a439520f8 genirq: Implement... |
51 |
if (likely(!irqd_is_setaffinity_pending(idata))) |
e7b946e98 [PATCH] genirq: i... |
52 |
return; |
32f4125eb genirq: Move INPR... |
53 |
if (unlikely(irqd_irq_disabled(idata))) |
2a786b452 [PATCH] genirq: M... |
54 |
return; |
e7b946e98 [PATCH] genirq: i... |
55 |
|
f1a06390d genirq: Prevent i... |
56 57 58 59 60 |
/* * Be careful vs. already masked interrupts. If this is a * threaded interrupt with ONESHOT set, we can end up with an * interrupt storm. */ |
32f4125eb genirq: Move INPR... |
61 |
masked = irqd_irq_masked(idata); |
f1a06390d genirq: Prevent i... |
62 |
if (!masked) |
a439520f8 genirq: Implement... |
63 64 |
idata->chip->irq_mask(idata); irq_move_masked_irq(idata); |
f1a06390d genirq: Prevent i... |
65 |
if (!masked) |
a439520f8 genirq: Implement... |
66 67 |
idata->chip->irq_unmask(idata); } |