x86: use cpumask_t instead of unsigned long
PATCH 1/1 x86: use cpumask_t instead of unsigned long
Current code can lead to corruption. Please apply the fix.
thanks,
suresh
--
Use cpumask_t instead of unsigned long.
Signed-off-by Suresh Siddha <[email protected]>
arch/i386/kernel/cpu/common.c +2 -2
@@ -455,7 +455,7 @@printk ("\n" ); } -unsigned long cpu_initialized__initdata =0 ; +cpumask_t cpu_initialized__initdata =CPU_MASK_NONE ;/* This is hacky. :) * We're emulating future behavior.
@@ -509,7 +509,7 @@struct tss_struct * t = &per_cpu (init_tss, cpu);struct thread_struct *thread = ¤t->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);for (;;)local_irq_enable (); }