lkml.org 
[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Implement missing x86_64 function smp_call_function_mask()
Andi Kleen wrote:
> On Thursday 23 August 2007 09:36:05 Laurent Vivier wrote:
>> This patch defines the missing function smp_call_function_mask() for x86_64,
>> this is more or less a cut&paste of i386 function.
>
> What do you need it for?

Hi Andi,

it is for KVM:

drivers/kvm/kvm_main.c:

203 void kvm_flush_remote_tlbs(struct kvm *kvm)
204 {
...
227 /*
228 * We really want smp_call_function_mask() here. But that's not
229 * available, so ipi all cpus in parallel and wait for them
230 * to complete.
231 */
232 for (cpu = first_cpu(cpus); cpu != NR_CPUS; cpu = next_cpu(cpu, cpus))
233 smp_call_function_single(cpu, ack_flush, &completed, 1, 0);
234 while (atomic_read(&completed) != needed) {
235 cpu_relax();
236 barrier();
237 }
238 }

Regards,
Laurent
--
------------- Laurent.Vivier@bull.net --------------
"Software is hard" - Donald Knuth

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-08-23 11:37    [W:0.169 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site