summaryrefslogtreecommitdiffstats
path: root/drivers/ras
diff options
context:
space:
mode:
authorqiuguorui1 <qiuguorui1@huawei.com>2020-08-20 11:16:29 +0800
committerMarc Zyngier <maz@kernel.org>2020-08-25 10:57:05 +0100
commite579076ac0a3bebb440fab101aef3c42c9f4c709 (patch)
tree7d49bb2faf3d0d792704c395409074f09160ee92 /drivers/ras
parenta150dac5a8fb711fdc378c23f44bee4546f04246 (diff)
downloadlinux-stable-e579076ac0a3bebb440fab101aef3c42c9f4c709.tar.gz
linux-stable-e579076ac0a3bebb440fab101aef3c42c9f4c709.tar.bz2
linux-stable-e579076ac0a3bebb440fab101aef3c42c9f4c709.zip
irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake
In the current code, when the eoi callback of the exti clears the pending bit of the current interrupt, it will first read the values of fpr and rpr, then logically OR the corresponding bit of the interrupt number, and finally write back to fpr and rpr. We found through experiments that if two exti interrupts, we call them int1/int2, arrive almost at the same time. in our scenario, the time difference is 30 microseconds, assuming int1 is triggered first. there will be an extreme scenario: both int's pending bit are set to 1, the irq handle of int1 is executed first, and eoi handle is then executed, at this moment, all pending bits are cleared, but the int 2 has not finally been reported to the cpu yet, which eventually lost int2. According to stm32's TRM description about rpr and fpr: Writing a 1 to this bit will trigger a rising edge event on event x, Writing 0 has no effect. Therefore, when clearing the pending bit, we only need to clear the pending bit of the irq. Fixes: 927abfc4461e7 ("irqchip/stm32: Add stm32mp1 support with hierarchy domain") Signed-off-by: qiuguorui1 <qiuguorui1@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org # v4.18+ Link: https://lore.kernel.org/r/20200820031629.15582-1-qiuguorui1@huawei.com
Diffstat (limited to 'drivers/ras')
0 files changed, 0 insertions, 0 deletions