rpmsg: Not convert va to pa when getting tx/rx buf
authorWendy Liang <jliang@xilinx.com>
Fri, 8 Jul 2016 16:55:29 +0000 (09:55 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:44 +0000 (22:01 -0700)
Logical address should be used of the buffer got from
rpmsg_get_tx_buffer. We should not convert logical
address back to physical address for the buffer need to
be returned.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/rpmsg/rpmsg_core.c

index d282763543841ccb39131f3fed82a7111c49b0a5..d389e8d2eb3f1d69666d6772eaf1c7e108c1e302 100644 (file)
@@ -413,7 +413,7 @@ void *rpmsg_get_tx_buffer(struct remote_device *rdev, unsigned long *len,
                    virtqueue_get_available_buffer(rdev->tvq, idx,
                                                   (uint32_t *) len);
        }
-       return ((void *)env_map_vatopa(data));
+       return data;
 }
 
 /**
@@ -440,7 +440,7 @@ void *rpmsg_get_rx_buffer(struct remote_device *rdev, unsigned long *len,
                    virtqueue_get_available_buffer(rdev->rvq, idx,
                                                   (uint32_t *) len);
        }
-       return ((void *)env_map_vatopa(data));
+       return data;
 }
 
 /**