• Lukasz Majewski's avatar
    usb: hsotg: samsung: smp Provide *_lock functions abstraction layer for SMP SoCs · 5ad1d316
    Lukasz Majewski authored
    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: default avatarLukasz Majewski <l.majewski@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    5ad1d316
s3c-hsotg.c 92.5 KB