diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2016-11-10 13:05:31 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad@kernel.org> | 2016-11-10 21:56:19 +0100 |
commit | d29fa0cb7602fa3e96c9eee05e14d14d3e823c89 (patch) | |
tree | 1bf24161f9f990f0377bff4d3da4c609a8abaa29 /drivers/xen/swiotlb-xen.c | |
parent | swiotlb: Add support for DMA_ATTR_SKIP_CPU_SYNC (diff) | |
download | linux-d29fa0cb7602fa3e96c9eee05e14d14d3e823c89.tar.xz linux-d29fa0cb7602fa3e96c9eee05e14d14d3e823c89.zip |
swiotlb: Minor fix-ups for DMA_ATTR_SKIP_CPU_SYNC support
I am updating the paths so that instead of trying to pass
"attr | DMA_ATTR_SKIP_CPU_SYNC" we instead just OR the value into attr and
then pass it since attr will not be used after we make the unmap call.
I realized there was one spot I had missed when I was applying the DMA
attribute to the DMA mapping exception handling. This change corrects that.
Finally it looks like there is a stray blank line at the end of the
swiotlb_unmap_sg_attrs function that can be dropped.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 3d048afcee38..478fb91e3df2 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -420,8 +420,8 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, if (dma_capable(dev, dev_addr, size)) return dev_addr; - swiotlb_tbl_unmap_single(dev, map, size, dir, - attrs | DMA_ATTR_SKIP_CPU_SYNC); + attrs |= DMA_ATTR_SKIP_CPU_SYNC; + swiotlb_tbl_unmap_single(dev, map, size, dir, attrs); return DMA_ERROR_CODE; } |