diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/lguest/lguest_device.c | 8 | ||||
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 2 | ||||
-rw-r--r-- | drivers/xen/manage.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 37344aaee22f..a661bbdae3d6 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -98,6 +98,10 @@ static u32 lg_get_features(struct virtio_device *vdev) | |||
98 | return features; | 98 | return features; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* The virtio core takes the features the Host offers, and copies the | ||
102 | * ones supported by the driver into the vdev->features array. Once | ||
103 | * that's all sorted out, this routine is called so we can tell the | ||
104 | * Host which features we understand and accept. */ | ||
101 | static void lg_finalize_features(struct virtio_device *vdev) | 105 | static void lg_finalize_features(struct virtio_device *vdev) |
102 | { | 106 | { |
103 | unsigned int i, bits; | 107 | unsigned int i, bits; |
@@ -108,6 +112,10 @@ static void lg_finalize_features(struct virtio_device *vdev) | |||
108 | /* Give virtio_ring a chance to accept features. */ | 112 | /* Give virtio_ring a chance to accept features. */ |
109 | vring_transport_features(vdev); | 113 | vring_transport_features(vdev); |
110 | 114 | ||
115 | /* The vdev->feature array is a Linux bitmask: this isn't the | ||
116 | * same as a the simple array of bits used by lguest devices | ||
117 | * for features. So we do this slow, manual conversion which is | ||
118 | * completely general. */ | ||
111 | memset(out_features, 0, desc->feature_len); | 119 | memset(out_features, 0, desc->feature_len); |
112 | bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8; | 120 | bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8; |
113 | for (i = 0; i < bits; i++) { | 121 | for (i = 0; i < bits; i++) { |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index bfef604160d1..62eab43152d2 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -158,7 +158,7 @@ static inline s64 towards_target(struct virtio_balloon *vb) | |||
158 | vb->vdev->config->get(vb->vdev, | 158 | vb->vdev->config->get(vb->vdev, |
159 | offsetof(struct virtio_balloon_config, num_pages), | 159 | offsetof(struct virtio_balloon_config, num_pages), |
160 | &v, sizeof(v)); | 160 | &v, sizeof(v)); |
161 | return v - vb->num_pages; | 161 | return (s64)v - vb->num_pages; |
162 | } | 162 | } |
163 | 163 | ||
164 | static void update_balloon_size(struct virtio_balloon *vb) | 164 | static void update_balloon_size(struct virtio_balloon *vb) |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index a5bc91ae6ff6..d0e87cbe157c 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -102,7 +102,7 @@ static void do_suspend(void) | |||
102 | /* XXX use normal device tree? */ | 102 | /* XXX use normal device tree? */ |
103 | xenbus_suspend(); | 103 | xenbus_suspend(); |
104 | 104 | ||
105 | err = stop_machine_run(xen_suspend, &cancelled, 0); | 105 | err = stop_machine(xen_suspend, &cancelled, &cpumask_of_cpu(0)); |
106 | if (err) { | 106 | if (err) { |
107 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); | 107 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); |
108 | goto out; | 108 | goto out; |