aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_device.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-30 10:25:58 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-29 17:56:02 -0500
commit2966af73e70dee461c256b5eb877b2ff757f8c82 (patch)
tree5cb8a81e80cb9b513fad015f0dc4d5e5db52fd14 /drivers/lguest/lguest_device.c
parent498af14783935af487d17dbee4ac451783cbc2b7 (diff)
virtio: use LGUEST_VRING_ALIGN instead of relying on pagesize
This doesn't really matter, since lguest is i386 only at the moment, but we could actually choose a different value. (lguest doesn't have a guarenteed ABI). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r--drivers/lguest/lguest_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index a661bbdae3d6..f062dc55c573 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -250,7 +250,7 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
250 /* Figure out how many pages the ring will take, and map that memory */ 250 /* Figure out how many pages the ring will take, and map that memory */
251 lvq->pages = lguest_map((unsigned long)lvq->config.pfn << PAGE_SHIFT, 251 lvq->pages = lguest_map((unsigned long)lvq->config.pfn << PAGE_SHIFT,
252 DIV_ROUND_UP(vring_size(lvq->config.num, 252 DIV_ROUND_UP(vring_size(lvq->config.num,
253 PAGE_SIZE), 253 LGUEST_VRING_ALIGN),
254 PAGE_SIZE)); 254 PAGE_SIZE));
255 if (!lvq->pages) { 255 if (!lvq->pages) {
256 err = -ENOMEM; 256 err = -ENOMEM;