]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/xen/smp.c
x86: split spinlock implementations out into their own files
[linux-2.6-omap-h63xx.git] / arch / x86 / xen / smp.c
index 800bb2191e2a37858f954fb27bc7c61cb25b8420..baca7f2fbd8a90fda8f031e8c860df88f9c34b56 100644 (file)
@@ -69,6 +69,7 @@ static __cpuinit void cpu_bringup_and_idle(void)
        preempt_disable();
 
        xen_enable_sysenter();
+       xen_enable_syscall();
 
        cpu = smp_processor_id();
        smp_store_cpu_info(cpu);
@@ -155,8 +156,10 @@ static void __init xen_fill_possible_map(void)
 
        for (i = 0; i < NR_CPUS; i++) {
                rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
-               if (rc >= 0)
+               if (rc >= 0) {
+                       num_processors++;
                        cpu_set(i, cpu_possible_map);
+               }
        }
 }
 
@@ -176,6 +179,8 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned cpu;
 
+       xen_init_lock_cpu(0);
+
        smp_store_cpu_info(0);
        cpu_data(0).x86_max_cores = 1;
        set_cpu_sibling_map(0);
@@ -298,6 +303,7 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
        clear_tsk_thread_flag(idle, TIF_FORK);
 #endif
        xen_setup_timer(cpu);
+       xen_init_lock_cpu(cpu);
 
        per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
 
@@ -358,7 +364,7 @@ static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector)
 
        cpus_and(mask, mask, cpu_online_map);
 
-       for_each_cpu_mask(cpu, mask)
+       for_each_cpu_mask_nr(cpu, mask)
                xen_send_IPI_one(cpu, vector);
 }
 
@@ -369,7 +375,7 @@ static void xen_smp_send_call_function_ipi(cpumask_t mask)
        xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
 
        /* Make sure other vcpus get a chance to run if they need to. */
-       for_each_cpu_mask(cpu, mask) {
+       for_each_cpu_mask_nr(cpu, mask) {
                if (xen_vcpu_stolen(cpu)) {
                        HYPERVISOR_sched_op(SCHEDOP_yield, 0);
                        break;
@@ -427,4 +433,5 @@ void __init xen_smp_init(void)
 {
        smp_ops = xen_smp_ops;
        xen_fill_possible_map();
+       xen_init_spinlocks();
 }