Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125358
b: refs/heads/master
c: b78936e
h: refs/heads/master
v: v3
  • Loading branch information
Mike Travis committed Dec 17, 2008
1 parent 1efd834 commit 3f6c8f9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22f65d31b25a320a5246592160bcb102d2791c45
refs/heads/master: b78936e14ee47b6b2d628501a0eab5270db80132
9 changes: 6 additions & 3 deletions trunk/arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "xen-ops.h"
#include "mmu.h"

cpumask_t xen_cpu_initialized_map;
cpumask_var_t xen_cpu_initialized_map;

static DEFINE_PER_CPU(int, resched_irq);
static DEFINE_PER_CPU(int, callfunc_irq);
Expand Down Expand Up @@ -192,7 +192,10 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
if (xen_smp_intr_init(0))
BUG();

xen_cpu_initialized_map = cpumask_of_cpu(0);
if (!alloc_cpumask_var(&xen_cpu_initialized_map, GFP_KERNEL))
panic("could not allocate xen_cpu_initialized_map\n");

cpumask_copy(xen_cpu_initialized_map, cpumask_of(0));

/* Restrict the possible_map according to max_cpus. */
while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
Expand Down Expand Up @@ -221,7 +224,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
struct vcpu_guest_context *ctxt;
struct desc_struct *gdt;

if (cpu_test_and_set(cpu, xen_cpu_initialized_map))
if (cpumask_test_and_set_cpu(cpu, xen_cpu_initialized_map))
return 0;

ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/xen/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ void xen_post_suspend(int suspend_cancelled)
pfn_to_mfn(xen_start_info->console.domU.mfn);
} else {
#ifdef CONFIG_SMP
xen_cpu_initialized_map = cpu_online_map;
BUG_ON(xen_cpu_initialized_map == NULL);
cpumask_copy(xen_cpu_initialized_map, cpu_online_mask);
#endif
xen_vcpu_restore();
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void __init xen_init_spinlocks(void);
__cpuinit void xen_init_lock_cpu(int cpu);
void xen_uninit_lock_cpu(int cpu);

extern cpumask_t xen_cpu_initialized_map;
extern cpumask_var_t xen_cpu_initialized_map;
#else
static inline void xen_smp_init(void) {}
#endif
Expand Down

0 comments on commit 3f6c8f9

Please sign in to comment.