Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Avi Kivity
Roland Dreier wrote: > I don't see any documented restrictions about preemption being > disabled when this function is called, but... > > > +int on_one_cpu(int cpu, void (*func) (void *info), void *info, > > + int retry, int wait) > > +{ > > + int ret; > > + int this_cpu; > > + > >

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Roland Dreier
I don't see any documented restrictions about preemption being disabled when this function is called, but... > +int on_one_cpu(int cpu, void (*func) (void *info), void *info, > + int retry, int wait) > +{ > +int ret; > +int this_cpu; > + > +this_cpu = get_cpu(); what

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Avi Kivity
Heiko Carstens wrote: > On Thu, May 24, 2007 at 03:10:12PM +0300, Avi Kivity wrote: > >> This defines on_one_cpu() which is similar to smp_call_function_single() >> except that it works if cpu happens to be the current cpu. Can also be >> seen as a complement to on_each_cpu() (which also doesn'

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Heiko Carstens
On Thu, May 24, 2007 at 03:10:12PM +0300, Avi Kivity wrote: > This defines on_one_cpu() which is similar to smp_call_function_single() > except that it works if cpu happens to be the current cpu. Can also be > seen as a complement to on_each_cpu() (which also doesn't treat the > current cpu specia

[kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Avi Kivity
This defines on_one_cpu() which is similar to smp_call_function_single() except that it works if cpu happens to be the current cpu. Can also be seen as a complement to on_each_cpu() (which also doesn't treat the current cpu specially). Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/li