search for: is_swiotlb_buff

Displaying 11 results from an estimated 11 matches for "is_swiotlb_buff".

Did you mean: is_swiotlb_buffer
2019 Dec 21
0
[PATCH 6/8] iommu: allow the dma-iommu api to use bounce buffers
...ad; + size_t iova_off = iova_offset(iovad, dma_addr); + size_t aligned_size = iova_align(iovad, size + iova_off); + phys_addr_t phys; + + phys = iommu_iova_to_phys(domain, dma_addr); + if (WARN_ON(!phys)) + return; + + __iommu_dma_unmap(dev, dma_addr, size); + +#ifdef CONFIG_SWIOTLB + if (unlikely(is_swiotlb_buffer(phys))) + swiotlb_tbl_unmap_single(dev, phys, size, + aligned_size, dir, attrs); +#endif +} + static dma_addr_t __iommu_dma_map(struct device *dev, phys_addr_t phys, - size_t size, int prot, dma_addr_t dma_mask) + size_t org_size, dma_addr_t dma_mask, bool coherent, + enum dma_data_direct...
2019 Feb 05
0
[vhost:linux-next 2/23] include/linux/swiotlb.h:99:22: error: static declaration of 'swiotlb_max_mapping_size' follows non-static declaration
...t device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, 77 size_t size, enum dma_data_direction dir, unsigned long attrs); 78 void __init swiotlb_exit(void); 79 unsigned int swiotlb_max_segment(void); 80 #else 81 #define swiotlb_force SWIOTLB_NO_FORCE 82 static inline bool is_swiotlb_buffer(phys_addr_t paddr) 83 { 84 return false; 85 } 86 static inline bool swiotlb_map(struct device *dev, phys_addr_t *phys, 87 dma_addr_t *dma_addr, size_t size, enum dma_data_direction dir, 88 unsigned long attrs) 89 { 90 return false; 91 } 92 static inli...
2019 Feb 07
0
[PATCH v7 2/5] swiotlb: Add is_swiotlb_active() function
...swiotlb_map(struct device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, void __init swiotlb_exit(void); unsigned int swiotlb_max_segment(void); size_t swiotlb_max_mapping_size(struct device *dev); +bool is_swiotlb_active(void); #else #define swiotlb_force SWIOTLB_NO_FORCE static inline bool is_swiotlb_buffer(phys_addr_t paddr) @@ -100,6 +101,11 @@ static inline size_t swiotlb_max_mapping_size(struct device *dev) { return SIZE_MAX; } + +static inline bool is_swiotlb_active(void) +{ + return false; +} #endif /* CONFIG_SWIOTLB */ extern void swiotlb_print_info(void); diff --git a/kernel/dma/swio...
2019 Feb 07
5
[PATCH v7 0/5] Fix virtio-blk issue with SWIOTLB
Hi, here is the next version of this patch-set. Previous versions can be found here: V1: https://lore.kernel.org/lkml/20190110134433.15672-1-joro at 8bytes.org/ V2: https://lore.kernel.org/lkml/20190115132257.6426-1-joro at 8bytes.org/ V3: https://lore.kernel.org/lkml/20190123163049.24863-1-joro at 8bytes.org/ V4: https://lore.kernel.org/lkml/20190129084342.26030-1-joro at 8bytes.org/
2019 Feb 05
0
[vhost:linux-next 3/23] include/linux/swiotlb.h:105:20: error: static declaration of 'is_swiotlb_active' follows non-static declaration
...t device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, 78 size_t size, enum dma_data_direction dir, unsigned long attrs); 79 void __init swiotlb_exit(void); 80 unsigned int swiotlb_max_segment(void); 81 #else 82 #define swiotlb_force SWIOTLB_NO_FORCE 83 static inline bool is_swiotlb_buffer(phys_addr_t paddr) 84 { 85 return false; 86 } 87 static inline bool swiotlb_map(struct device *dev, phys_addr_t *phys, 88 dma_addr_t *dma_addr, size_t size, enum dma_data_direction dir, 89 unsigned long attrs) 90 { 91 return false; 92 } 93 static inli...
2020 Apr 29
0
[PATCH 1/5] swiotlb: Introduce concept of swiotlb_pool
...94a372f2d4e Lu Baolu 2019-09-06 4018 cfb94a372f2d4e Lu Baolu 2019-09-06 4019 return (phys_addr_t)iova_pfn << PAGE_SHIFT; cfb94a372f2d4e Lu Baolu 2019-09-06 4020 cfb94a372f2d4e Lu Baolu 2019-09-06 4021 mapping_error: cfb94a372f2d4e Lu Baolu 2019-09-06 4022 if (is_swiotlb_buffer(tlb_addr)) cfb94a372f2d4e Lu Baolu 2019-09-06 4023 swiotlb_tbl_unmap_single(dev, tlb_addr, size, cfb94a372f2d4e Lu Baolu 2019-09-06 4024 aligned_size, dir, attrs); cfb94a372f2d4e Lu Baolu 2019-09-06 4025 swiotlb_error: cfb94a372f2d4e Lu Baolu 2019-09-06 4026 free_...
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the
2008 Nov 13
69
[PATCH 00 of 38] xen: add more Xen dom0 support
Hi Ingo, Here''s the chunk of patches to add Xen Dom0 support (it''s probably worth creating a new xen/dom0 topic branch for it). A dom0 Xen domain is basically the same as a normal domU domain, but it has extra privileges to directly access hardware. There are two issues to deal with: - translating to and from the domain''s pseudo-physical addresses and real machine
2020 Aug 19
39
a saner API for allocating DMA addressable pages
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. I'm still a
2016 Jun 02
52
[RFC v3 00/45] dma-mapping: Use unsigned long for dma_attrs
Hi, This is third approach (complete this time) for replacing struct dma_attrs with unsigned long. The main patch (2/45) doing the change is split into many subpatches for easier review (3-43). They should be squashed together when applying. *Important:* Patchset is *only* build tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc. Please provide reviewes and tests for other