projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
799dd75
)
ARM: S3C64XX: DMA: Protect buffer pointers while manipulation
author
Jassi Brar
<
[email protected]
>
Thu, 5 Nov 2009 04:44:20 +0000
(13:44 +0900)
committer
Ben Dooks
<
[email protected]
>
Mon, 9 Nov 2009 23:50:39 +0000
(23:50 +0000)
Ensure the DMA buffer points are not updated from
another source during the process of enquing a buffer.
Signed-off-by: Jassi Brar <
[email protected]
>
[
[email protected]
: Updated patch comment]
Signed-off-by: Ben Dooks <
[email protected]
>
arch/arm/plat-s3c64xx/dma.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-s3c64xx/dma.c
b/arch/arm/plat-s3c64xx/dma.c
index 266a10745a85988c36f74671ab216bf60dd3cd96..6fa706f0f42a4d9a6bbd9eae7b9bede8aa672dbc 100644
(file)
--- a/
arch/arm/plat-s3c64xx/dma.c
+++ b/
arch/arm/plat-s3c64xx/dma.c
@@
-339,6
+339,7
@@
int s3c2410_dma_enqueue(unsigned int channel, void *id,
struct s3c64xx_dma_buff *next;
struct s3c64xx_dma_buff *buff;
struct pl080s_lli *lli;
+ unsigned long flags;
int ret;
WARN_ON(!chan);
@@
-366,6
+367,8
@@
int s3c2410_dma_enqueue(unsigned int channel, void *id,
s3c64xx_dma_fill_lli(chan, lli, data, size);
+ local_irq_save(flags);
+
if ((next = chan->next) != NULL) {
struct s3c64xx_dma_buff *end = chan->end;
struct pl080s_lli *endlli = end->lli;
@@
-397,6
+400,8
@@
int s3c2410_dma_enqueue(unsigned int channel, void *id,
s3c64xx_lli_to_regs(chan, lli);
}
+ local_irq_restore(flags);
+
show_lli(lli);
dbg_showchan(chan);