Skip to content
Commit 801df5af authored by Oussama Ghorbel's avatar Oussama Ghorbel Committed by Tiejun Chen
Browse files

usb: dwc_otg: fix system lockup when interrupts are threaded



Fix lockup in dwc_otg driver that leads to a system freeze of the
4-core Raspberry Pi board when RT Preempt kernel is in use or when
interrupts are threaded in general.
The lockup occurs when the irq handler thread gets preempted while it
holds the fiq spin lock.
The patch makes sure to disable local irq while fiq spin lock is held
irrespective of whether the interrupt is threaded or not.
The patch also unifies the use of the fiq spin lock outside the fiq
handler by introducing two function-like macros fiq_fsm_spin_lock_irqsave
and fiq_fsm_spin_unlock_irqrestore.

Under RT kernel, the bug can be reproduced in a few minutes by running
hackbench and cyclictest in this way
$ ( while true; do nice hackbench 30 >/dev/null; done )&
$ echo "run 'kill $!' to stop hackbench"
$ cyclictest -a -t -n -p 80

Signed-off-by: default avatarOussama Ghorbel <ghorbel@gmail.com>
[local_irq_{save,restore}() -> local_irq_{save,restore}_nort()]
Signed-off-by: default avatarTiejun Chen <tiejun.china@gmail.com>
parent 6c58c30f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment