mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
arm: dma: Expand the page protection attributes
Currently, the decision on which page protection to use is limited to writecombine and coherent. Expand to include non consistent memory. Change-Id: I7585fe3ce804cf321a5585c3d93deb7a7c95045c Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Charan Teja Reddy <charante@codeaurora.org> Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org> Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
This commit is contained in:
parent
ae9f381057
commit
de79fc71ee
1 changed files with 6 additions and 3 deletions
|
|
@ -605,9 +605,12 @@ static void __free_from_contiguous(struct device *dev, struct page *page,
|
|||
|
||||
static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
|
||||
{
|
||||
prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
|
||||
pgprot_writecombine(prot) :
|
||||
pgprot_dmacoherent(prot);
|
||||
if (attrs & DMA_ATTR_WRITE_COMBINE)
|
||||
prot = pgprot_writecombine(prot);
|
||||
/* if non-consistent just pass back what was given */
|
||||
else if ((attrs & DMA_ATTR_NON_CONSISTENT) == 0)
|
||||
prot = pgprot_dmacoherent(prot);
|
||||
|
||||
return prot;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue