* [Patch] x86: use cpumask_t instead of unsigned long
@ 2005-01-14 21:36 Siddha, Suresh B
0 siblings, 0 replies; only message in thread
From: Siddha, Suresh B @ 2005-01-14 21:36 UTC (permalink / raw)
To: linux-kernel, akpm
Current code can lead to corruption. Please apply the fix.
thanks,
suresh
--
Use cpumask_t instead of unsigned long.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
diff -Nru linux-2.6.10/arch/i386/kernel/cpu/common.c linux-cpumask/arch/i386/kernel/cpu/common.c
--- linux-2.6.10/arch/i386/kernel/cpu/common.c 2004-12-24 13:33:50.000000000 -0800
+++ linux-cpumask/arch/i386/kernel/cpu/common.c 2005-01-14 11:45:39.876089160 -0800
@@ -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();
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-14 21:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-14 21:36 [Patch] x86: use cpumask_t instead of unsigned long Siddha, Suresh B
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome