File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
18
18
{
19
19
struct irq_data * d = irq_desc_get_irq_data (desc );
20
20
struct irq_chip * chip = irq_data_get_irq_chip (d );
21
+ bool maskchip = !irq_can_move_pcntxt (d ) && !irqd_irq_masked (d );
21
22
const struct cpumask * affinity ;
22
23
bool brokeaff = false;
23
24
int err ;
@@ -69,6 +70,10 @@ static bool migrate_one_irq(struct irq_desc *desc)
69
70
if (irq_fixup_move_pending (desc , true))
70
71
affinity = irq_desc_get_pending_mask (desc );
71
72
73
+ /* Mask the chip for interrupts which cannot move in process context */
74
+ if (maskchip && chip -> irq_mask )
75
+ chip -> irq_mask (d );
76
+
72
77
if (cpumask_any_and (affinity , cpu_online_mask ) >= nr_cpu_ids ) {
73
78
affinity = cpu_online_mask ;
74
79
brokeaff = true;
@@ -78,8 +83,12 @@ static bool migrate_one_irq(struct irq_desc *desc)
78
83
if (err ) {
79
84
pr_warn_ratelimited ("IRQ%u: set affinity failed(%d).\n" ,
80
85
d -> irq , err );
81
- return false;
86
+ brokeaff = false;
82
87
}
88
+
89
+ if (maskchip && chip -> irq_unmask )
90
+ chip -> irq_unmask (d );
91
+
83
92
return brokeaff ;
84
93
}
85
94
You can’t perform that action at this time.
0 commit comments