Thread (32 messages) 32 messages, 5 authors, 2011-02-17
STALE5602d

[PATCH v2 1/7] mmc: mxs-mmc: add mmc host driver for i.MX23/28

From: arnd@arndb.de (Arnd Bergmann)
Date: 2011-02-16 15:59:18
Also in: linux-mmc

On Wednesday 16 February 2011, Shawn Guo wrote:
It's caused by spinlock recursion introduced by mxs-dma functions
mxs_dma_tx_submit and mxs_dma_tasklet.  We have mmc_request_done
invoked in the dma callback tasklet.  At the meantime,
mmc_request_done will issue retries in some case, which will call in
mxs_dma_tx_submit.

I added the lock by referring to other dma driver implementation, but
now I'm considering to remove the lock completely, as I do not see
any global data needs to be protected there.  Comments?
You need to be sure that the data accessed in the tasklet does not
need to be locked against mxs_dma_tx_submit.

I haven't looked at the dmaengine code for this, but it's quite likely
that you actually need it, because you need to serialize adding an
element to the DMA device with removing it again.

Also, since the lock is taken in a tasklet, every thread that takes
it outside of a tasklet must do spin_lock_bh(), not spin_lock(), to
prevent the tasklet from running.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help