Commit 25c28c1c authored by Suresh B. Siddha's avatar Suresh B. Siddha Committed by Linus Torvalds

[PATCH] x86: use cpumask_t instead of unsigned long

Current code can lead to corruption.  Use cpumask_t instead of unsigned
long.
Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f39f308b
...@@ -504,7 +504,7 @@ void __init print_cpu_info(struct cpuinfo_x86 *c) ...@@ -504,7 +504,7 @@ void __init print_cpu_info(struct cpuinfo_x86 *c)
printk("\n"); printk("\n");
} }
unsigned long cpu_initialized __initdata = 0; cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
/* This is hacky. :) /* This is hacky. :)
* We're emulating future behavior. * We're emulating future behavior.
...@@ -558,7 +558,7 @@ void __init cpu_init (void) ...@@ -558,7 +558,7 @@ void __init cpu_init (void)
struct tss_struct * t = &per_cpu(init_tss, cpu); struct tss_struct * t = &per_cpu(init_tss, cpu);
struct thread_struct *thread = &current->thread; struct thread_struct *thread = &current->thread;
if (test_and_set_bit(cpu, &cpu_initialized)) { if (cpu_test_and_set(cpu, cpu_initialized)) {
printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
for (;;) local_irq_enable(); for (;;) local_irq_enable();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment