search for: hwdev

Displaying 20 results from an estimated 32 matches for "hwdev".

Did you mean: hdev
2008 Dec 22
17
[PATCH 0 of 9] swiotlb: use phys_addr_t for pages
Hi all, Here''s a work in progress series whcih does a partial revert of the previous swiotlb changes, and does a partial replacement with Becky Bruce''s series. The most important difference is Becky''s use of phys_addr_t rather than page+offset to represent arbitrary pages. This turns out to be simpler. I didn''t replicate the map_single_page changes, since
2016 Jun 02
0
[RFC v3 20/45] xen: dma-mapping: Use unsigned long for dma_attrs
...files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 7399782c0998..87e6035c9e81 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -294,7 +294,7 @@ error: void * xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags, - struct dma_attrs *attrs) + unsigned long attrs) { void *ret; int order = get_order(size); @@ -346,7 +346,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_alloc_coherent); void xen_swiotlb_free_coherent(struct device *hwdev, size_t siz...
2013 Dec 09
1
[PATCH] xen/arm64: do not call the swiotlb functions twice
...diff --git a/arch/arm64/include/asm/xen/page-coherent.h b/arch/arm64/include/asm/xen/page-coherent.h index 2820f1a..dde3fc9 100644 --- a/arch/arm64/include/asm/xen/page-coherent.h +++ b/arch/arm64/include/asm/xen/page-coherent.h @@ -23,25 +23,21 @@ static inline void xen_dma_map_page(struct device *hwdev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs) { - __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); } static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, size_...
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
...machine_multi from xen_create_contiguous_region to update the p2m; - remove XENMEM_unpin and XENMEM_exchange_and_pin; - set nr_exchanged to 0 before calling the hypercall; - return xen_dma_ops only if we are the initial domain; - rename __get_dma_ops to __generic_dma_ops; - call __generic_dma_ops(hwdev)->alloc/free on arm64 too; - introduce xen_dma_map/unmap_page and xen_dma_sync_single_for_cpu/device; - use xen_dma_map/unmap_page, xen_dma_sync_single_for_cpu/device in swiotlb-xen; - use dev_warn instead of pr_warn; - remove the extra autotranslate check in biomerge.c; - call set_phys_to_mac...
2005 Apr 15
0
[PATCH] Eliminate kernel version checks from i386/kernel/pci-dma.c
...offset -#define pud_t pgd_t -#define pud_offset(d, va) d -#endif struct dma_coherent_mem { void *virt_base; @@ -85,24 +78,13 @@ xen_contig_memory(unsigned long vstart, balloon_unlock(flags); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) -#else void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, int gfp) -#endif { void *ret; unsigned int order = get_order(size); unsigned long vstart; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - int g...
2013 Jan 24
1
[PATCH 35/35] x86: Don't panic if can not alloc buffer for swiotlb
...unsigned long swiotlb_nr_tbl(void); extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 196b069..bfe02b8 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -122,11 +122,18 @@ static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, return phys_to_dma(hwdev, virt_to_phys(address)); } +static bool no_iotlb_memory; + void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; + if (no_iotlb_memory) { + pr_warn("software IO TLB: No low mem\n");...
2013 Jan 24
1
[PATCH 35/35] x86: Don't panic if can not alloc buffer for swiotlb
...unsigned long swiotlb_nr_tbl(void); extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 196b069..bfe02b8 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -122,11 +122,18 @@ static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, return phys_to_dma(hwdev, virt_to_phys(address)); } +static bool no_iotlb_memory; + void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; + if (no_iotlb_memory) { + pr_warn("software IO TLB: No low mem\n");...
2023 May 19
1
[PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On Fri, May 19, 2023 at 01:49:46PM +0100, Andrew Cooper wrote: > > The alternative would be to finally merge swiotlb-xen into swiotlb, in > > which case we might be able to do this later. Let me see what I can > > do there. > > If that is an option, it would be great to reduce the special-cashing. I think it's doable, and I've been wanting it for a while. I just
2018 Jul 30
1
[RFC 1/4] virtio: Define virtio_direct_dma_ops structure
...addr_t virtio_direct_map_page(struct device *dev, struct page *page, > + unsigned long offset, size_t size, > + enum dma_data_direction dir, > + unsigned long attrs) All these functions should probably be marked static. > +void virtio_direct_unmap_page(struct device *hwdev, dma_addr_t dev_addr, > + size_t size, enum dma_data_direction dir, > + unsigned long attrs) > +{ > +} No need to implement no-op callbacks in struct dma_map_ops. > + > +int virtio_direct_mapping_error(struct device *hwdev, dma_addr_t dma_addr) > +{ > + return 0; >...
2007 Jan 20
5
[PATCH] Fix linux compilation on x86-64
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386. Signed-off-by: Stefan Berger <stefanb@us.ibm.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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
2018 May 10
4
kernel spew from nouveau/ swiotlb
...is full'|wc -l 2052 homer:/novell/ssh # dmesg|grep 'callbacks suppressed'|wc -l 171 lib/swiotlb.c: 573 not_found: 574         spin_unlock_irqrestore(&io_tlb_lock, flags); 575         if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) 576                 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies? -Mike
2018 May 11
2
kernel spew from nouveau/ swiotlb
...suppressed'|wc -l > > 171 > > > > lib/swiotlb.c: > > 573 not_found: > > 574         spin_unlock_irqrestore(&io_tlb_lock, flags); > > 575         if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) > > 576                 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); > > > > Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies? > > Or should ttm perhaps always use the one on hand? (seems to work) No it didn't, I just didn't wait long enough for spew to start....
2016 Jun 02
0
[RFC v3 44/45] dma-mapping: Remove dma_get_attr
...0) __dma_page_dev_to_cpu(page, offset, size, dir); iommu_unmap(mapping->domain, iova, len); diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c index fc67ed236a10..d062f08f5020 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c @@ -102,7 +102,7 @@ void __xen_dma_map_page(struct device *hwdev, struct page *page, { if (is_device_dma_coherent(hwdev)) return; - if (dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) + if (attrs & DMA_ATTR_SKIP_CPU_SYNC) return; __xen_dma_page_cpu_to_dev(hwdev, dev_addr, size, dir); @@ -115,7 +115,7 @@ void __xen_dma_unmap_page(struct device *hwde...
2001 Jul 29
1
WAVE Format info
...e fire, I found the following document on the Microsoft website. It appears to be the file format counterpart to the API documentation presented by Chris Wolf. I'm not familiar with the WAVE format, so I'll let you guys interpret it (or tell me it is irrelevant): http://www.microsoft.com/HWDEV/audio/multichaud.htm [As an aside: Why does Microsoft make it so hard to find a definitive spec for the WAVE format? I searched their site in vain for something resembling a "RIFF Audio Spec, Version XXX.YYY" document. It isn't like this is new technology or anything.] --- Stan S...
2008 Apr 29
2
PV DMA for PCI passthrough devices for KVM
This patchset implements PVDMA for handling DMA requests from devices assigned to the guest from the host machine. They're also available from git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git pvdma These patches are based on my pci-passthrough tree, which is available from git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git and the userspace from
2008 Apr 29
2
PV DMA for PCI passthrough devices for KVM
This patchset implements PVDMA for handling DMA requests from devices assigned to the guest from the host machine. They're also available from git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git pvdma These patches are based on my pci-passthrough tree, which is available from git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git and the userspace from
2018 Jul 20
0
[RFC 1/4] virtio: Define virtio_direct_dma_ops structure
...O_F_IOMMU_PLATFORM. + */ +dma_addr_t virtio_direct_map_page(struct device *dev, struct page *page, + unsigned long offset, size_t size, + enum dma_data_direction dir, + unsigned long attrs) +{ + return page_to_phys(page) + offset; +} + +void virtio_direct_unmap_page(struct device *hwdev, dma_addr_t dev_addr, + size_t size, enum dma_data_direction dir, + unsigned long attrs) +{ +} + +int virtio_direct_mapping_error(struct device *hwdev, dma_addr_t dma_addr) +{ + return 0; +} + +void *virtio_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, + gfp_t gfp, unsi...
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
2018 May 10
0
kernel spew from nouveau/ swiotlb
...ll/ssh # dmesg|grep 'callbacks suppressed'|wc -l > 171 > > lib/swiotlb.c: > 573 not_found: > 574         spin_unlock_irqrestore(&io_tlb_lock, flags); > 575         if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) > 576                 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd > bytes)\n", size); > > Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies? > Could you bisect ? I would love to point finger upstream to the DMA folk who made changes to that API without testing with GPU. Cheers, Jérôme