Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
lguest: update commentry
stop_machine: Remove deprecated stop_machine_run
stop_machine: wean Xen off stop_machine_run
virtio_balloon: fix towards_target when deflating balloon

+19 -20
+8
Documentation/lguest/lguest.c
··· 895 895 } 896 896 } 897 897 898 + /* This is called when we no longer want to hear about Guest changes to a 899 + * virtqueue. This is more efficient in high-traffic cases, but it means we 900 + * have to set a timer to check if any more changes have occurred. */ 898 901 static void block_vq(struct virtqueue *vq) 899 902 { 900 903 struct itimerval itm; ··· 942 939 if (!timeout && num) 943 940 block_vq(vq); 944 941 942 + /* We never quite know how long should we wait before we check the 943 + * queue again for more packets. We start at 500 microseconds, and if 944 + * we get fewer packets than last time, we assume we made the timeout 945 + * too small and increase it by 10 microseconds. Otherwise, we drop it 946 + * by one microsecond every time. It seems to work well enough. */ 945 947 if (timeout) { 946 948 if (num < last_timeout_num) 947 949 timeout_usec += 10;
+8
drivers/lguest/lguest_device.c
··· 98 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 105 static void lg_finalize_features(struct virtio_device *vdev) 102 106 { 103 107 unsigned int i, bits; ··· 112 108 /* Give virtio_ring a chance to accept features. */ 113 109 vring_transport_features(vdev); 114 110 111 + /* The vdev->feature array is a Linux bitmask: this isn't the 112 + * same as a the simple array of bits used by lguest devices 113 + * for features. So we do this slow, manual conversion which is 114 + * completely general. */ 115 115 memset(out_features, 0, desc->feature_len); 116 116 bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8; 117 117 for (i = 0; i < bits; i++) {
+1 -1
drivers/virtio/virtio_balloon.c
··· 158 158 vb->vdev->config->get(vb->vdev, 159 159 offsetof(struct virtio_balloon_config, num_pages), 160 160 &v, sizeof(v)); 161 - return v - vb->num_pages; 161 + return (s64)v - vb->num_pages; 162 162 } 163 163 164 164 static void update_balloon_size(struct virtio_balloon *vb)
+1 -1
drivers/xen/manage.c
··· 102 102 /* XXX use normal device tree? */ 103 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 106 if (err) { 107 107 printk(KERN_ERR "failed to start xen_suspend: %d\n", err); 108 108 goto out;
+1 -18
include/linux/stop_machine.h
··· 3 3 /* "Bogolock": stop the entire machine, disable interrupts. This is a 4 4 very heavy lock, which is equivalent to grabbing every spinlock 5 5 (and more). So the "read" side to such a lock is anything which 6 - diables preeempt. */ 6 + disables preeempt. */ 7 7 #include <linux/cpu.h> 8 8 #include <linux/cpumask.h> 9 9 #include <asm/system.h> 10 10 11 11 #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) 12 - 13 - /* Deprecated, but useful for transition. */ 14 - #define ALL_CPUS ~0U 15 12 16 13 /** 17 14 * stop_machine: freeze the machine on all CPUs and run this function ··· 47 50 return ret; 48 51 } 49 52 #endif /* CONFIG_SMP */ 50 - 51 - static inline int __deprecated stop_machine_run(int (*fn)(void *), void *data, 52 - unsigned int cpu) 53 - { 54 - /* If they don't care which cpu fn runs on, just pick one. */ 55 - if (cpu == NR_CPUS) 56 - return stop_machine(fn, data, NULL); 57 - else if (cpu == ~0U) 58 - return stop_machine(fn, data, &cpu_possible_map); 59 - else { 60 - cpumask_t cpus = cpumask_of_cpu(cpu); 61 - return stop_machine(fn, data, &cpus); 62 - } 63 - } 64 53 #endif /* _LINUX_STOP_MACHINE */