aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/amba
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2011-01-03 17:45:37 -0500
committerDan Williams <dan.j.williams@intel.com>2011-01-04 22:16:14 -0500
commitc370e594efe2993620d24d41a78f325102e99d1c (patch)
treedfbb5c904bf6ca85c9aba1eec17070fe05c12ca4 /include/linux/amba
parent8087aacda040bdbf84940712d132ce80c30b9d5d (diff)
ARM: PL08x: fix locking between prepare function and submit function
The PL08x driver holds on to the channel lock with interrupts disabled between the prepare and the subsequent submit API functions. This means that the locking state when the prepare function returns is dependent on whether it suceeeds or not. It did this to ensure that the physical channel wasn't released, and as it used to add the descriptor onto the pending list at prepare time rather than submit time. Now that we have reorganized the code to remove those reasons, we can now safely release the spinlock at the end of preparation and reacquire it in our submit function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/amba')
-rw-r--r--include/linux/amba/pl08x.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h
index 95b76ea1829f..933b4ed12be5 100644
--- a/include/linux/amba/pl08x.h
+++ b/include/linux/amba/pl08x.h
@@ -162,9 +162,6 @@ enum pl08x_dma_chan_state {
162 * @lc: last completed transaction on this channel 162 * @lc: last completed transaction on this channel
163 * @pend_list: queued transactions pending on this channel 163 * @pend_list: queued transactions pending on this channel
164 * @at: active transaction on this channel 164 * @at: active transaction on this channel
165 * @lockflags: sometimes we let a lock last between two function calls,
166 * especially prep/submit, and then we need to store the IRQ flags
167 * in the channel state, here
168 * @lock: a lock for this channel data 165 * @lock: a lock for this channel data
169 * @host: a pointer to the host (internal use) 166 * @host: a pointer to the host (internal use)
170 * @state: whether the channel is idle, paused, running etc 167 * @state: whether the channel is idle, paused, running etc
@@ -184,7 +181,6 @@ struct pl08x_dma_chan {
184 dma_cookie_t lc; 181 dma_cookie_t lc;
185 struct list_head pend_list; 182 struct list_head pend_list;
186 struct pl08x_txd *at; 183 struct pl08x_txd *at;
187 unsigned long lockflags;
188 spinlock_t lock; 184 spinlock_t lock;
189 struct pl08x_driver_data *host; 185 struct pl08x_driver_data *host;
190 enum pl08x_dma_chan_state state; 186 enum pl08x_dma_chan_state state;