dmaengine: qcom_hidma: make pending_tre_count atomic
authorSinan Kaya <okaya@codeaurora.org>
Fri, 21 Oct 2016 16:37:56 +0000 (12:37 -0400)
committerVinod Koul <vinod.koul@intel.com>
Thu, 3 Nov 2016 13:25:44 +0000 (18:55 +0530)
commitbdcfddfd7481d7756edfeb30fc28b550f6c64812
tree25799f85346a01ee8b106a7ae39008db67af6f63
parentfc737969f645c1cbb1d167604eb7082fe18809c4
dmaengine: qcom_hidma: make pending_tre_count atomic

Getting ready for the MSI interrupts. The pending_tre_count is used
in the interrupt handler to make sure all outstanding requests are
serviced.

The driver will allocate 11 MSI interrupts. Each MSI interrupt can be
assigned to a different CPU. Then, we have a race condition for common
variables as they share the same interrupt handler with a different
cause bit and they can potentially be executed in parallel. Making this
variable atomic so that it can be updated from multiple processor
contexts.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/qcom/hidma.h
drivers/dma/qcom/hidma_dbg.c
drivers/dma/qcom/hidma_ll.c