On Mon, 2008-12-08 at 16:09 +0000, Avi Kivity wrote: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index ba4275d..2d6ca79 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -568,14 +570,17 @@ static bool make_all_cpus_request(struct kvm *kvm, > unsigned int req) > if (test_and_set_bit(req, &vcpu->requests)) > continue; > cpu = vcpu->cpu; > - if (cpu != -1 && cpu != me) > - cpu_set(cpu, cpus); > - } > - if (!cpus_empty(cpus)) { > - smp_call_function_mask(cpus, ack_flush, NULL, 1); > - called = true; > + if (cpus != NULL && cpu != -1 && cpu != me) > + cpumask_set_cpu(cpu, cpus); > } > + if (unlikely(cpus == NULL)) > + smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1); > + else if (!cpumask_empty(cpus)) > + smp_call_function_many(cpus, ack_flush, NULL, 1); > + else > + called = false; > put_cpu(); > + free_cpumask_var(cpus); > return called; > }
This patch breaks uniprocessor builds, because smp_call_function_many() is only defined for CONFIG_SMP. Avi, I think you should be able to build a PowerPC KVM kernel at this point? That would have caught this error. Rusty, could you ack the following: cpumask: define smp_call_function_many() for non-SMP builds Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -67,13 +67,6 @@ int smp_call_function(void(*func)(void * /* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */ int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, int wait); - -static inline void smp_call_function_many(const struct cpumask *mask, - void (*func)(void *info), void *info, - int wait) -{ - smp_call_function_mask(*mask, func, info, wait); -} int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, int wait); @@ -151,6 +144,13 @@ static inline void init_call_single_data } #endif /* !SMP */ +static inline void smp_call_function_many(const struct cpumask *mask, + void (*func)(void *info), void *info, + int wait) +{ + smp_call_function_mask(*mask, func, info, wait); +} + /* * smp_processor_id(): get the current CPU ID. * -- Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html