projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abc2159
)
ARM64: dma-mapping: zero the buffer that allocate with __GFP_ZERO flags
author
CMY
<cmy@rock-chips.com>
Sat, 14 Feb 2015 08:03:06 +0000
(16:03 +0800)
committer
CMY
<cmy@rock-chips.com>
Sat, 14 Feb 2015 08:03:06 +0000
(16:03 +0800)
arch/arm64/mm/dma-mapping.c
patch
|
blob
|
history
diff --git
a/arch/arm64/mm/dma-mapping.c
b/arch/arm64/mm/dma-mapping.c
index eeb1cf3ff2999316d25f9cc6ef83e4d534042e26..aff368c35d62eb6b7181fe75e04d8ebe48d2319b 100644
(file)
--- a/
arch/arm64/mm/dma-mapping.c
+++ b/
arch/arm64/mm/dma-mapping.c
@@
-158,6
+158,9
@@
static void *__dma_alloc_noncoherent(struct device *dev, size_t size,
if (!ptr)
goto no_mem;
+ if (flags & __GFP_ZERO)
+ memset(ptr, 0, size);
+
/* remove any dirty cache lines on the kernel alias */
__dma_flush_range(ptr, ptr + size);