diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index f0fc1a4f565a..d8ef0bf577d2 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -608,3 +608,15 @@ xen_swiotlb_dma_supported(struct device *hwdev, u64 mask) | |||
608 | return xen_virt_to_bus(xen_io_tlb_end - 1) <= mask; | 608 | return xen_virt_to_bus(xen_io_tlb_end - 1) <= mask; |
609 | } | 609 | } |
610 | EXPORT_SYMBOL_GPL(xen_swiotlb_dma_supported); | 610 | EXPORT_SYMBOL_GPL(xen_swiotlb_dma_supported); |
611 | |||
612 | int | ||
613 | xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask) | ||
614 | { | ||
615 | if (!dev->dma_mask || !xen_swiotlb_dma_supported(dev, dma_mask)) | ||
616 | return -EIO; | ||
617 | |||
618 | *dev->dma_mask = dma_mask; | ||
619 | |||
620 | return 0; | ||
621 | } | ||
622 | EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_mask); | ||