Skip to content

Commit 50e6e32

Browse files
bypelwell
authored andcommitted
pinctrl: rp1: fix GPIO IRQ thread affinity on PREEMPT_RT
rp1_gpio_irq_set_affinity() delegates to the parent chip but does not call irq_data_update_effective_affinity() and does not return IRQ_SET_MASK_OK_DONE. This causes the same PREEMPT_RT thread affinity problem as in the MFD layer, at the pinctrl level of the interrupt hierarchy. Fix by updating the effective affinity and returning IRQ_SET_MASK_OK_DONE on success. Fixes: #7301 Signed-off-by: Michael Byczkowski <by@by-online.de>
1 parent ff67db0 commit 50e6e32

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/pinctrl/pinctrl-rp1.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,15 @@ static int rp1_gpio_irq_set_affinity(struct irq_data *data, const struct cpumask
958958
}
959959
}
960960

961-
if (parent_data && parent_data->chip->irq_set_affinity)
962-
return parent_data->chip->irq_set_affinity(parent_data, dest, force);
961+
if (parent_data && parent_data->chip->irq_set_affinity) {
962+
int ret = parent_data->chip->irq_set_affinity(parent_data, dest, force);
963+
964+
if (ret >= 0) {
965+
irq_data_update_effective_affinity(data, dest);
966+
return IRQ_SET_MASK_OK_DONE;
967+
}
968+
return ret;
969+
}
963970

964971
return -EINVAL;
965972
}

0 commit comments

Comments
 (0)