VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / arm / common / dmabounce.c
index 0d0d8e8..c3a8766 100644 (file)
@@ -234,7 +234,7 @@ map_single(struct device *dev, void *ptr, size_t size,
                }
        }
 
-       dma_addr = virt_to_bus(ptr);
+       dma_addr = virt_to_dma(dev, ptr);
 
        if (device_info && dma_needs_bounce(dev, dma_addr, size)) {
                struct safe_buffer *buf;
@@ -248,7 +248,7 @@ map_single(struct device *dev, void *ptr, size_t size,
 
                dev_dbg(dev,
                        "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-                       __func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+                       __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
                        buf->safe, (void *) buf->safe_dma_addr);
 
                if ((dir == DMA_TO_DEVICE) ||
@@ -290,7 +290,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
 
                dev_dbg(dev,
                        "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-                       __func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+                       __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
                        buf->safe, (void *) buf->safe_dma_addr);
 
 
@@ -342,7 +342,7 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
 
                dev_dbg(dev,
                        "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-                       __func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+                       __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
                        buf->safe, (void *) buf->safe_dma_addr);
 
                DO_STATS ( device_info->bounce_count++ );
@@ -367,7 +367,7 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                }
                consistent_sync(buf->safe, size, dir);
        } else {
-               consistent_sync(bus_to_virt(dma_addr), size, dir);
+               consistent_sync(dma_to_virt(dev, dma_addr), size, dir);
        }
 }