Re: [patch 1/8] test: allow functions to execute on non-irq context remotely

Avi Kivity
2010-03-25T16:25:59Z

On 03/24/2010 11:24 PM, Marcelo Tosatti wrote:
> Which allows code to execute on remote cpus while receiving interrupts.
>
> Also move late smp initialization to common code, and the smp loop
> to C code.
>

> +
> +void smp_loop(void)
> +{
> + void (*fn)(void *data);
> + void *data;
> +
> + asm volatile ("hlt");
>

Racy. The interrupt can happen before the hlt, which will kill the
cpu. Needs to be

cli
while not smp_function():
sti; hlt
cli
sti
smp_function()(smp_data())

Also need to make sure two on_cpu_noipi()s don't stomp on each other.

--
error compiling committee.c: too many arguments to function