From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [Patch] x86: use cpumask_t instead of unsigned long
Date: Fri, 14 Jan 2005 13:36:02 -0800 [thread overview]
Message-ID: <20050114133602.A13523@unix-os.sc.intel.com> (raw)
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();
}
reply other threads:[~2005-01-14 21:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050114133602.A13523@unix-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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