diff options
author | Marc Zyngier <maz@kernel.org> | 2021-07-25 19:07:54 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-08-05 12:41:06 +0100 |
commit | 9ff80e2de36d0554e3a6da18a171719fe8663c17 (patch) | |
tree | 89053da4d70cc9ce4ba58e07ecb659d0d5ba50f9 /drivers/mfd/tc3589x.c | |
parent | ab09511fb69bdd4c4767053d7766f4bb9d6e36ec (diff) | |
download | lwn-9ff80e2de36d0554e3a6da18a171719fe8663c17.tar.gz lwn-9ff80e2de36d0554e3a6da18a171719fe8663c17.zip |
mfd: Don't use irq_create_mapping() to resolve a mapping
Although irq_create_mapping() is able to deal with duplicate
mappings, it really isn't supposed to be a substitute for
irq_find_mapping(), and can result in allocations that take place
in atomic context if the mapping didn't exist.
Fix the handful of MFD drivers that use irq_create_mapping() in
interrupt context by using irq_find_mapping() instead.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/tc3589x.c')
-rw-r--r-- | drivers/mfd/tc3589x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 7614f8fe0e91..13583cdb93b6 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -187,7 +187,7 @@ again: while (status) { int bit = __ffs(status); - int virq = irq_create_mapping(tc3589x->domain, bit); + int virq = irq_find_mapping(tc3589x->domain, bit); handle_nested_irq(virq); status &= ~(1 << bit); |