summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gasket
diff options
context:
space:
mode:
authorNick Ewalt2018-09-17 14:38:59 +0200
committerGreg Kroah-Hartman2018-09-18 13:22:01 +0200
commit912b8a811cc1bf26334840e9f532136072569b17 (patch)
treeaf15f471d83c8f69f7cb7867a601f3c8af65b78b /drivers/staging/gasket
parentstaging: gasket: page table: use GFP_KERNEL for dma_alloc_coherent (diff)
downloadkernel-qcow2-linux-912b8a811cc1bf26334840e9f532136072569b17.tar.gz
kernel-qcow2-linux-912b8a811cc1bf26334840e9f532136072569b17.tar.xz
kernel-qcow2-linux-912b8a811cc1bf26334840e9f532136072569b17.zip
staging: gasket: fix DMA direction for extended page tables
Extended page tables should be mapped as DMA_TO_DEVICE, not bi-directional. Signed-off-by: Nick Ewalt <nicholasewalt@google.com> Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket')
-rw-r--r--drivers/staging/gasket/gasket_page_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c
index 71b77da2e18c..e86bdc5fc79d 100644
--- a/drivers/staging/gasket/gasket_page_table.c
+++ b/drivers/staging/gasket/gasket_page_table.c
@@ -320,7 +320,7 @@ static void gasket_free_extended_subtable(struct gasket_page_table *pg_tbl,
if (pte->dma_addr)
dma_unmap_page(pg_tbl->device, pte->dma_addr, PAGE_SIZE,
- DMA_BIDIRECTIONAL);
+ DMA_TO_DEVICE);
vfree(pte->sublevel);
@@ -894,7 +894,7 @@ static int gasket_alloc_extended_subtable(struct gasket_page_table *pg_tbl,
/* Map the page into DMA space. */
pte->dma_addr = dma_map_page(pg_tbl->device, pte->page, 0, PAGE_SIZE,
- DMA_BIDIRECTIONAL);
+ DMA_TO_DEVICE);
/* make the addresses available to the device */
dma_addr = (pte->dma_addr + pte->offset) | GASKET_VALID_SLOT_FLAG;