* Boris Ostrovsky <boris.ostrov...@oracle.com> wrote:

> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index 8650cdb..4da0008 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -498,6 +498,7 @@ static int xen_cpu_disable(void)
>       if (cpu == 0)
>               return -EBUSY;
>  
> +     init_completion(&per_cpu(die_complete, smp_processor_id()));
>       cpu_disable_common();
>  
>       load_cr3(swapper_pg_dir);
> @@ -510,6 +511,9 @@ static void xen_cpu_die(unsigned int cpu)
>               current->state = TASK_UNINTERRUPTIBLE;
>               schedule_timeout(HZ/10);
>       }
> +
> +     wait_for_completion_timeout(&per_cpu(die_complete, cpu), HZ);
> +
>       xen_smp_intr_free(cpu);
>       xen_uninit_lock_cpu(cpu);
>       xen_teardown_timer(cpu);

So why not put it into cpu_disable_common() and do the same 
change for native_cpu_disable()?

Likewise, the waiting bit should be put into a common function as 
well (newly introduced, if need to be), we don't want to expose 
internal x86 core data structures to the Xen guest code.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to