Displaying 12 results from an estimated 12 matches for "xen_bus_to_phys".
2015 Dec 07
0
[PATCH RFC 1/3] xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
...e shift is done before casting to 64bit.
- */
-static inline dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
-{
- unsigned long bfn = pfn_to_bfn(PFN_DOWN(paddr));
- dma_addr_t dma = (dma_addr_t)bfn << PAGE_SHIFT;
-
- dma |= paddr & ~PAGE_MASK;
-
- return dma;
-}
-
-static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
-{
- unsigned long pfn = bfn_to_pfn(PFN_DOWN(baddr));
- dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT;
- phys_addr_t paddr = dma;
-
- paddr |= baddr & ~PAGE_MASK;
-
- return paddr;
-}
-
-static inline dma_addr_t xen_virt_to_bus(void *address)
-{
- return xen_phys_to_bus...
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
...at dma_mask as a limit;
- arm/dmabounce: keep using arm_dma_ops;
- add missing __init in xen_early_init declaration;
- many code style and name changes in swiotlb-xen.c;
- improve error checks in xen_dma_add_entry;
- warn on XENMEM_put_dma_buf failures.
Changes in v2:
- fixed a couple of errors in xen_bus_to_phys, xen_phys_to_bus and
xen_swiotlb_fixup.
Julien Grall (1):
ASoC: Samsung: Rename dma_ops by samsung_dma_ops
Stefano Stabellini (18):
arm: make SWIOTLB available
arm64: define DMA_ERROR_CODE
arm/xen,arm64/xen: introduce p2m
xen/x86: allow __set_phys_to_machine for a...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...ch #3).
Instead this series adds few obvious checks to perform address
translations in a couple of key places, without changing non-Xen code
paths. You are welcome to suggest improvements or alternative
implementations.
Thanks,
Stefano
Stefano Stabellini (3):
xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
xen/virtio: allocate a contiguous region to be use as virtio queue
xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++----
drivers/virtio/virtio_ring.c | 9 +++++----
drivers/xen/s...
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
...ch #3).
Instead this series adds few obvious checks to perform address
translations in a couple of key places, without changing non-Xen code
paths. You are welcome to suggest improvements or alternative
implementations.
Thanks,
Stefano
Stefano Stabellini (3):
xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
xen/virtio: allocate a contiguous region to be use as virtio queue
xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++----
drivers/virtio/virtio_ring.c | 9 +++++----
drivers/xen/s...
2016 Jun 02
0
[RFC v3 20/45] xen: dma-mapping: Use unsigned long for dma_attrs
...xen_phys_to_bus(phys);
@@ -434,7 +434,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_map_page);
*/
static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
size_t size, enum dma_data_direction dir,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
phys_addr_t paddr = xen_bus_to_phys(dev_addr);
@@ -462,7 +462,7 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
size_t size, enum dma_data_direction dir,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
xen...
2015 Dec 07
0
[PATCH RFC 3/3] xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
...ing a virtio device
@@ -237,11 +239,23 @@ static inline u64 virtio64_to_cpu(struct virtio_device *vdev, __virtio64 val)
return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
}
+static inline u64 virtio_addr_to_cpu(struct virtio_device *vdev, __virtio64 val)
+{
+ val = xen_pv_domain() ? xen_bus_to_phys(val) : val;
+ return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
+}
+
static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
{
return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
}
+static inline __virtio64 cpu_to_virtio_addr(struct virtio_device *...
2013 Nov 11
0
[GIT PULL] (xen) stable/for-linus-3.13-rc0-tag
..._dma_map/unmap_page, xen_dma_sync_single_for_cpu/device
swiotlb: print a warning when the swiotlb is full
arm,arm64: do not always merge biovec if we are running on Xen
grant-table: call set_phys_to_machine after mapping grant refs
swiotlb-xen: static inline xen_phys_to_bus, xen_bus_to_phys, xen_virt_to_bus and range_straddles_page_boundary
swiotlb-xen: fix error code returned by xen_swiotlb_map_sg_attrs
arm: make SWIOTLB available
pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI
swiotlb-xen: missing include dma-direction.h
arm,arm64/include/as...
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series...
Joe Perches (44):
arch/arm: Remove unnecessary semicolons
arch/microblaze: Remove unnecessary semicolons
arch/um: Remove unnecessary semicolons
drivers/cpufreq: Remove unnecessary semicolons
drivers/gpio: Remove unnecessary semicolons
drivers/i2c: Remove unnecessary semicolons
drivers/isdn: Remove unnecessary semicolons
drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series...
Joe Perches (44):
arch/arm: Remove unnecessary semicolons
arch/microblaze: Remove unnecessary semicolons
arch/um: Remove unnecessary semicolons
drivers/cpufreq: Remove unnecessary semicolons
drivers/gpio: Remove unnecessary semicolons
drivers/i2c: Remove unnecessary semicolons
drivers/isdn: Remove unnecessary semicolons
drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series...
Joe Perches (44):
arch/arm: Remove unnecessary semicolons
arch/microblaze: Remove unnecessary semicolons
arch/um: Remove unnecessary semicolons
drivers/cpufreq: Remove unnecessary semicolons
drivers/gpio: Remove unnecessary semicolons
drivers/i2c: Remove unnecessary semicolons
drivers/isdn: Remove unnecessary semicolons
drivers/leds: Remove unnecessary
2010 Nov 15
2
[PATCH 00/44] remove unnecessary semicolons
ya trivial series...
Joe Perches (44):
arch/arm: Remove unnecessary semicolons
arch/microblaze: Remove unnecessary semicolons
arch/um: Remove unnecessary semicolons
drivers/cpufreq: Remove unnecessary semicolons
drivers/gpio: Remove unnecessary semicolons
drivers/i2c: Remove unnecessary semicolons
drivers/isdn: Remove unnecessary semicolons
drivers/leds: Remove unnecessary
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