usb: hsotg: samsung: smp Provide *_lock functions abstraction layer for SMP SoCs
authorLukasz Majewski <l.majewski@samsung.com>
Thu, 14 Jun 2012 08:02:26 +0000 (10:02 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 15 Jun 2012 11:38:07 +0000 (14:38 +0300)
commit5ad1d3160973c588db806072968d7a2a93cb2a80
tree5e7606ce39b83f7b50c90bfa71e4584bae70ac6c
parent2b19a52cc8a31ede990323d46a7faeeeba76bb8f
usb: hsotg: samsung: smp Provide *_lock functions abstraction layer for SMP SoCs

For SMP processors the spin_lock_irqsave is _only_ able to disable interrupt
on a core on which it is executed.

Therefore there may be a situation when other cores raise s3c-hsotg IRQ.
Then there are several places where critical sections can be overwritten.

To protect the above thread, a spin_lock in the interrupt handler has been
added. Due to coherent memory view (especially L1 cache) the spin lock
variable control access to IRQ handler only for one CPU core. In this way
serialization to access this driver is provided and hence several spin_lock_*
routines could be removed from IRQ handler's related functions.

The complete_request_lock function has been removed since all its calls
are performed from interrupt (spin lock protected) context.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/s3c-hsotg.c
This page took 0.026649 seconds and 5 git commands to generate.